#include #include #include #include #include using namespace std; typedef long long LL; const LL Mod = 1000000007; const int Max = 1100000; LL Inv[Max]; LL ans[Max]; LL Pow(LL n,LL m) { LL ans = 1; while(m) { if(m%2) { ans = (ans*n)%Mod; } n = (n*n)%Mod; m>>=1; } return ans; } void Init() { for(int i = 1;i>T; while(T--) { cin>>n; cout<