#include #define int long long #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() using namespace std; templateistream&operator>>(istream&I,vector&v){for(auto&i:v)I>>i;return I;} templateostream&operator<<(ostream&O,vector&v){for(auto&i:v)O<>n; if(n>=1000000007)cout<<0; else{ int ans=fact[n/10000000]; for(int i=n/10000000*10000000+1;i<=n;i++)ans=ans*i%1000000007; cout<>t; while(t--)AC::solve(); }