T=int(input()) for i in range(T): x=input() if x==0:print("Y") else:print("N")