#include typedef int LL; typedef double dl; #define opt operator #define pb push_back const LL maxn=1000+7,mod=1e9+7,inf=0x3f3f3f3f; LL Read(){ LL x(0),f(1); char c=getchar(); while(c<'0' || c>'9'){ if(c=='-') f=-1; c=getchar(); } while(c>='0' && c<='9'){ x=(x<<3ll)+(x<<1ll)+c-'0'; c=getchar(); }return x*f; } void Chkmin(LL &x,LL y){ if(yx) x=y; } LL add(LL x,LL y){ return x+=y,x>=mod?x-mod:x; } LL dec(LL x,LL y){ return x-=y,x<0?x+mod:x; } LL mul(LL x,LL y){ return 1ll*x*y%mod; } LL T,n,m; LL f[maxn][maxn],g[maxn],f2[maxn][maxn],h[maxn][maxn][13]; int main(){ T=Read(); LL N(1000); for(LL i=1;i<=N;++i) g[i]=i-1; h[1][0][0]=1; for(LL i=1;i