def power(m,n,x):
if(n==0):
return 1
if(n==1):
return m
temp=power(m,n/2,x)
if n%2 == 0:
return (temp%x*temp%x)%x
else:
return (m*temp%x*temp%x)%x
t=int(input())
g=1298074214633706835075030044377087
while(t):
t=t-1
p=int(input())
print (power(2,p+1,g)-1)%g
ZGVmIHBvd2VyKG0sbix4KToKCWlmKG49PTApOgoJCXJldHVybiAxCglpZihuPT0xKToKCQlyZXR1cm4gbQoJdGVtcD1wb3dlcihtLG4vMix4KQoJaWYgbiUyID09IDA6CgkJcmV0dXJuICh0ZW1wJXgqdGVtcCV4KSV4CgllbHNlOgogICAJCXJldHVybiAobSp0ZW1wJXgqdGVtcCV4KSV4CnQ9aW50KGlucHV0KCkpCmc9MTI5ODA3NDIxNDYzMzcwNjgzNTA3NTAzMDA0NDM3NzA4Nwp3aGlsZSh0KToKICB0PXQtMQogIHA9aW50KGlucHV0KCkpIAogIHByaW50IChwb3dlcigyLHArMSxnKS0xKSVn