#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
using namespace std;
string to_string(string s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
const int MAXN = 1e6 + 9;
const int MOD = (int)(1e9 + 7);
const int LOG2MAXN = 17;
const int INF = 1e9;
const long double eps = 1e-9;
int di[] = {0, 1, 0, -1};
int dj[] = {1, 0, -1, 0};
char ddir[] = {'R', 'U', 'L', 'D'};
mt19937_64 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
long long mod = 1e9 + 7;
int ans[111][2];
void solve() {
  int tt;
  cin >> tt;
  while (tt--) {
    long long x;
    cin >> x;
    long long p = 0;
    while (x) {
      if (x & 1) p++;
      x /= 2;
    }
    cout << (1 << p) << endl;
  }
}
void input() {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  input();
  solve();
  return 0;
}

### Prompt

Your challenge is to write a CPP solution to the following problem:

Colossal! — exclaimed Hawk-nose. — A programmer! That's exactly what we are looking for.

Arkadi and Boris Strugatsky. Monday starts on Saturday

Reading the book "Equations of Mathematical Magic" Roman Oira-Oira and Cristobal Junta found an interesting equation: a - (a ⊕ x) - x = 0 for some given a, where ⊕ stands for a bitwise exclusive or (XOR) of two integers (this operation is denoted as ^ or xor in many modern programming languages). Oira-Oira quickly found some x, which is the solution of the equation, but Cristobal Junta decided that Oira-Oira's result is not interesting enough, so he asked his colleague how many non-negative solutions of this equation exist. This task turned out to be too difficult for Oira-Oira, so he asks you to help.

Input

Each test contains several possible values of a and your task is to find the number of equation's solution for each of them. The first line contains an integer t (1 ≤ t ≤ 1000) — the number of these values.

The following t lines contain the values of parameter a, each value is an integer from 0 to 2^{30} - 1 inclusive.

Output

For each value of a print exactly one integer — the number of non-negative solutions of the equation for the given value of the parameter. Print answers in the same order as values of a appear in the input.

One can show that the number of solutions is always finite.

Example

Input

3
0
2
1073741823


Output

1
2
1073741824

Note

Let's define the bitwise exclusive OR (XOR) operation. Given two integers x and y, consider their binary representations (possibly with leading zeroes): x_k ... x_2 x_1 x_0 and y_k ... y_2 y_1 y_0. Here, x_i is the i-th bit of the number x and y_i is the i-th bit of the number y. Let r = x ⊕ y be the result of the XOR operation of x and y. Then r is defined as r_k ... r_2 r_1 r_0 where:

$$$ r_i = \left\{ \begin{aligned} 1, ~ if ~ x_i ≠ y_i \\\ 0, ~ if ~ x_i = y_i \end{aligned} \right. $$$

For the first value of the parameter, only x = 0 is a solution of the equation.

For the second value of the parameter, solutions are x = 0 and x = 2.

### Response

```cpp
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
using namespace std;
string to_string(string s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
const int MAXN = 1e6 + 9;
const int MOD = (int)(1e9 + 7);
const int LOG2MAXN = 17;
const int INF = 1e9;
const long double eps = 1e-9;
int di[] = {0, 1, 0, -1};
int dj[] = {1, 0, -1, 0};
char ddir[] = {'R', 'U', 'L', 'D'};
mt19937_64 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
long long mod = 1e9 + 7;
int ans[111][2];
void solve() {
  int tt;
  cin >> tt;
  while (tt--) {
    long long x;
    cin >> x;
    long long p = 0;
    while (x) {
      if (x & 1) p++;
      x /= 2;
    }
    cout << (1 << p) << endl;
  }
}
void input() {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  input();
  solve();
  return 0;
}

```