#include <bits/stdc++.h>
using namespace std;
const long long N = (5e5) + 322;
const long long INF = (long long)(1e12);
const long long mod = 998244353;
const double eps = 1e-9;
long long t;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cin >> t;
  for (long long i = 1; i <= t; ++i) {
    long long x;
    cin >> x;
    cout << (1 << __builtin_popcountll(x)) << "\n";
  }
  return 0;
}
