#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define clr(s) memset(s,0,sizeof(s)) #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 const double PI = acos(-1); const ll mod = 1e9+7; int t,n; ll ans[1000005]; int main() { cin>>t; ans[1]=1; ans[2]=2; for(int i=3;i<=1000000;i++) ans[i]=(ans[i-1]+(i-1)*ans[i-2])%mod; int cas=1; while(t--){ cin>>n; cout<<"Case #"<