#pragma GCC optimize("Ofast") #pragma GCC target("avx2") char*mmap(); char wbuf[1<<25]; #define rd_skip() while(*rp++>=48) #define rd(v) long v=0;{long _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;} #define WTHI(v) {long _z=v,_n=0,_d=0;while(++_n,_d=_d<<8|0x30|_z%10,_z/=10);*(long*)wp=_d;wp+=_n;} #define WTLO(v) {long _z=v,_n=8,_d=0;while(_d=_d<<8|0x30|_z%10,_z/=10,--_n);*(long*)wp=_d;wp+=8;} #define wt(v) if(v>=100000000){WTHI(v/100000000);WTLO(v);}else{WTHI(v);} #define MD 998244353 int d[1000002]; void f0(){ long b=650; long c=1300; long m=1300; for(long n=2;n<=1000000;){ d[n++]=b; d[n++]=c; m=m*26%MD; b=(b*26+m+(MD-650))%MD; c=(c*26+m)%MD; } } void f1(){ char*rp=mmap(0l,1l<<25,1,2,0,0ll); char*wp=wbuf; rd_skip(); while(*rp){ rd(n); wt(d[n]); *wp++='\n'; } write(1,wbuf,wp-wbuf); } main(){ f0(); f1(); _exit(0); }