#include

#include

using namespace std;

long long fast_exp(int base, int exp) {

long long MOD=1000000007;

long long res=1;

while(exp>0) {

if(exp%2==1) res=(res*base)%MOD;
base=(base*base)%MOD;

exp/=2;

}

cout<< res%MOD<<endl;

}

main()

{

int t,base=2,exp;

cin>>t;

while(t–)

{

cin>>exp;

fast_exp(base,exp);

}

}

//what is exactly wrong with my code??