#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#define ll long long
using namespace std;
const int size = 600;
struct node{
int m[size];
int po; //我的下标不应该从0开始 ,乘的时候出错了,
}te;
const int mx = 0;
void dis(node a){
//cout<<"结果"<<endl;
for(int i = a.po; i>=0; i--)
cout<<a.m[i];
cout<<endl;
}
node mul(node &s1, node &s2){
// node te; //结构体没有初始化非常的危险,数组里面的数都是随机的,大部分为0
//if(s2.po == -1)
// s2.m[0] = 1;
memset(te.m, 0, sizeof(te.m));
//int ob;
for(int i = 0; i <= s1.po; i++)
for(int j = 0; j <= s2.po; j++){
te.m[i + j] += s1.m[i] * s2.m[j];
}
te.po = s1.po + s2.po;
//ob = 0;
for(int i = 0; i <= te.po; i++){
if(te.m[i] > 9){
te.m[i + 1] += te.m[i] / 10;
te.m[i] = te.m[i] % 10;
}
}
if(te.m[te.po+1] > 0)
te.po++;
return te;
}
void zhuan(node &a, int n){
a.po = -1;
while(n){
a.po++;
a.m[a.po]= n%10;
n/=10;
}
}
node power(int n){
node ans,a;
zhuan(ans,1);
zhuan(a,2);
while(n){
if(n&1)
ans = mul(ans,a);
n /= 2;
a = mul(a,a);
}
return ans;
}
int main(){
int T,n;
scanf("%d",&T);
while(T--){
scanf("%d",&n);
if(n==0){
puts("1");
continue;
}
node te =power(n);
dis(te);
}
return 0;
}