#include #define For(i,l,r) for (register int i=l; i<=r; i++) using namespace std; typedef unsigned long long LL; typedef signed long long ll; template inline void read(T &x) { char c = getchar(); int w = 1; x = 0; while (!isdigit(c)) (c == '-') && (w = -w), c = getchar(); while (isdigit(c)) x = (x << 1) + (x << 3) + (c ^ '0'), c = getchar(); x *= w; } int T, n; //bool vis[100]; const int ans[80] = {1,2,2,4,2,4,4,8,2,4,6,8,2,8,6,16,2,4,6,8,4,12,6,16,4,4,4,16,2,12,10,32,4,4,8,8,2,12,6,16,2,8,6,24,6,12,8,32,6,8,6,8,2,8,10,32,4,4,6,24,2,20,6,64,6,8,8,8,4,16,6,16,2,4,8,24,14,12,6,32}; //inline void dfs(int x, int now) { // if (now == n) { // ++ ans; return; // } // if (!vis[(x-now+n)%n]) { // vis[(x-now+n)%n] = true; // dfs((x-now+n)%n, now+1); // vis[(x-now+n)%n] = false; // } // if (!vis[(x+now)%n]) { // vis[(x+now)%n] = true; // dfs((x+now)%n, now+1); // vis[(x+now)%n] = false; // } //} signed main() { read(T); while (T -- > 0) { read(n); printf("%d\n", ans[n-1]); // memset(vis, false, sizeof(vis)); // vis[1] = true; // ans = 0; // dfs(1, 1); // cout << ans << endl; } return 0; }