#define EmiliaMyWife ios::sync_with_stdio(0); cin.tie(NULL); using ll = int64_t; constint MOD = 1e9+7; /*--------------------------------------------------------------------------------------*/
constint N = 1e6 + 25; ll frac[N];
ll mpow(ll a, int b){ ll res = 1; for(; b; b >>= 1, a = a * a % MOD) if(b & 1) res = res * a % MOD; return res; } ll c(int n, int m){ return frac[n] * mpow(frac[m], MOD - 2) % MOD * mpow(frac[n - m], MOD - 2) % MOD; }
signedmain(){ EmiliaMyWife frac[0] = 1; for(int i = 1; i < N; i++) frac[i] = frac[i - 1] * i % MOD;
int t; cin >> t; while(t--) { int n; cin >> n; cout << c(n, n / 2) * mpow(n / 2 + 1, MOD - 2) % MOD << '\n'; } }