#include #include #include #include #include using namespace std; const int N = 1050; const int P = 26; const int Mod = 1000000007; int zuhe[N][N]; int cc[N]; char dr[N]; int n; int getint() { int res=0; char ch=getchar(); while((ch<'0' || ch>'9') && ch!='-') ch=getchar(); bool fan=0; if(ch=='-') { fan=1; ch=getchar(); } while('0'<=ch && ch<='9') { res=res*10+ch-'0'; ch=getchar(); } if(fan) res=-res; return res; } int jia(int x,int y) { x+=y; if(x>=Mod) x-=Mod; return x; } int cheng(int x,int y) { long long z=x; z*=y; z%=Mod; x=z; return x; } void Init() { int i,j; for(i=0;i