#include #include #define N 100005 #define MOD 1000000007 using namespace std; long long f[N][4]; int main() { int t; cin>>t; f[1][1]=26; f[1][0]=26; for (int i=2;i<=2000;i++) { f[i][1]=((long long)f[i-1][0]*25)%MOD; f[i][2]=f[i-1][1]; f[i][3]=f[i-2][1]; f[i][0]=((long long)f[i][1]+f[i][2]+f[i][3])%MOD; } while (t--) { int n; cin>>n; printf("%I64d\n",f[n][0]%MOD); } }