#include #define RAN(v) v.begin(), v.end() #define pb push_back #define lb lower_bound #define ub upper_bound #define I (J + 1) #define J (i + j >> 1) #define P (k << 1) #define S (P ^ 1) using namespace std; typedef long long ll; template inline void upd1(T1& a, const T2& b) { a = a < b ? a : b; } template inline void upd2(T1& a, const T2& b) { a = b < a ? a : b; } ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } struct Ano { operator ll() { ll x = 0, y = 0, c = getchar(); while (c < 48) { y = c == 45; c = getchar(); } while (c > 47) { x = x*10 + c-48; c = getchar(); } return y ? -x : x; } } buf; constexpr int N = 2e5 + 5; int n; int s; bool vis[101]; void dfs(int k, int i) { if (vis[i]) return; if (k == n) ++s; else { vis[i] = 1; dfs(k + 1, (i + k) % n); dfs(k + 1, (i - k + n) % n); vis[i] = 0; } } constexpr int f[] = {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}; int main() { for (int q = buf; q; --q) { n = buf; printf("%d\n", f[n - 1]); } }