For this Question: There is a sequence P, which is represented by the following recurrence
P(N) = P(N-2) + P(N-3)
P(0) = P(1) = P(2) = 1
Now given a number N your task is to find the Nth number in this sequence.
Note: Since the output could be very long, take mod 1000000007. And try to give the most optimum solution as you can.The input line contains T, denoting the number of testcases. Each testcase contains single line containing an integer N.

Constraints:
1 <= T <= 15 
1 <= N <=100For each testcase, print the nth number of the P sequence in a newline.Sample Input:
2
12
10

Sample Output:
21
12

Explanation:
Testcase 1:
As per the recurrence relation given in the question, we are basically adding last second and last third numbers of the sequence in bottom up manner. Let's see this case
P(3) = P(1) + P(0) = 2
P(4) = P(2) + P(1) = 2
P(5) = P(3) + P(2) = 3
P(6) = P(4) + P(3) = 4
P(7) = P(5) + P(4) = 5
P(8) = P(6) + P(5) = 7
P(9) = P(7) + P(6) = 9
P(10) = P(8) + P(7) = 12
P(11) = P(9) + P(8) = 16
P(12) = P(10) + P(9) = 21
, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {

    public static void main (String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int t = Integer.parseInt(br.readLine());
        long[] dp = new long[101];
        Arrays.fill(dp,-1);
        while(t-- > 0) {
            int n = Integer.parseInt(br.readLine());
            if(dp[n] != -1) {
                System.out.println(dp[n]);
            } else {
                System.out.println(solve(n,dp));
            }
        }
    }
    static long solve(int n,long[] dp)  {
        int mod = 1000000007;
        if(n < 3) return 1;
        if(dp[n] != -1) return dp[n];
        return dp[n] = (solve(n-3,dp)%mod+solve(n-2,dp)%mod)%mod;
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?