n=int(input())
num_list=list(map(int,input().split()))
for i in num_list:
i=bin(i)
cnt0=i.count('0')-1
cnt1=i.count('1')
if cnt0%2==0 and cnt1%2==0:
print(10,end=' ')
elif cnt0%2==0:
print(0,end=' ')
elif cnt1%2==0:
print(1,end=' ')
else:
print(100,end=' ')