T=int(input()) for tests in range(T): N=int(input()) if N in X: print(1) else: print(2)