#The solution in Python 3 is as follows:
for _ in range(int(input())): print (pow(2, int(input())-1, 1000000007))
#No need of permutation
#Keep visiting for more solutions of SPOJ problems in Python 3.Thank you!!!
for _ in range(int(input())): print (pow(2, int(input())-1, 1000000007))
#No need of permutation
#Keep visiting for more solutions of SPOJ problems in Python 3.Thank you!!!