Given an equation of the form F(n) = F(n-2) + F(n-3) where F(0) = 1, F(1) = 0, F(2) = 1 , the task is to find the nth term of this sequence.
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains an integer N.
For each test case in a new line print the nth term of the sequence mod 10^9+7.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.