for k in[*map(int,open(0))][1:]:print(ord(" \n )3=GQ[e↟∃∄◬♐♑"[k*(k<25)])-2)