#include <stdio.h>
#include <math.h>
#define ll long long
int fibo[1001];
void init(){
fibo[0] = 0;
fibo[1] = 1;
for(int i = 2; i <= 1000; i++){
fibo[i] = fibo[i - 1] + fibo[i - 2];
fibo[i] %= (int)(1e9 + 7);
}
}
int main(){
init();
int t;
scanf("%d", &t);
while(t--){
int n;
scanf("%d", &n);
printf("%d\n", fibo[n]);
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+CgojZGVmaW5lIGxsIGxvbmcgbG9uZyAKCmludCBmaWJvWzEwMDFdOwp2b2lkIGluaXQoKXsKCWZpYm9bMF0gPSAwOwoJZmlib1sxXSA9IDE7Cglmb3IoaW50IGkgPSAyOyBpIDw9IDEwMDA7IGkrKyl7CgkJZmlib1tpXSA9IGZpYm9baSAtIDFdICsgZmlib1tpIC0gMl07CgkJZmlib1tpXSAlPSAoaW50KSgxZTkgKyA3KTsKCX0KfQoKaW50IG1haW4oKXsKCWluaXQoKTsKCWludCB0OwoJc2NhbmYoIiVkIiwgJnQpOwoJd2hpbGUodC0tKXsKCQlpbnQgbjsKCQlzY2FuZigiJWQiLCAmbik7CgkJcHJpbnRmKCIlZFxuIiwgZmlib1tuXSk7Cgl9Cn0=