#include #include #include #define LL long long #define Mod 1000000007 using namespace std; LL dp[2100][27]; int main() { int T,n; for(int i =0 ; i<26; i++) dp[1][i] = 1; for(int i = 2; i<=2000; i++) { for(int j = 0; j < 26; j++) { for(int k = 1; k<=3; k++) { if(k > i) break; if(k == i) { dp[i][j] = (dp[i][j] + 1)%Mod; } for(int e=0; e<26; e++) { if(j != e) dp[i][j] = (dp[i][j] + dp[i-k][e])%Mod; } } } } scanf("%d",&T); while(T-- && scanf("%d",&n)) { LL ans = 0; for(int i = 0; i<26; i++) { ans = (ans + dp[n][i])%Mod; } cout<