#ifndef LOCAL
#include <bits/stdc++.h>
#define debug(...)
#endif
using namespace std;
#define int long long
#define cinv(v) for (auto &it:v) cin>>it;
#define coutv(v) for (auto &it:v) cout<< it<<' '; cout<<'\n';
const int N = 1e6 + 5;
vector<int> spf(N), ans(N);
int last = 1;
int nod(int x) {
int ret = 1;
while (spf[x] > 1) {
int now = spf[x], cnt = 0;
while (spf[x] == now) x /= spf[x], cnt++;
ret *= (cnt + 1);
}
return ret;
}
void shelby() {
int n;
cin >> n;
cout << ans[n] << '\n';
}
signed main() {
cin.tie(0)->sync_with_stdio(0);
iota(spf.begin(), spf.end(), 0);
for (int i = 2; i < N; ++i) {
if (spf[i] == i) {
for (int j = i * i; j < N; j += i) if (spf[j] == j) spf[j] = i;
}
}
ans[1] = 1;
for (int i = 2; i < N; ++i) {
int a = (i + 1) / 2, b = i + (i % 2 == 0), d = nod(a) * nod(b);
if (d > last) {
ans[i] = d;
last = d;
}
else ans[i] = ans[i - 1];
}
int t = 1;
cin >> t;
for (int _ = 1; _ <= t; ++_) {
// cout << "Case " << _ << ": ";
shelby();
}
}