T = int(input()) ans_list = [] for i in range(T): x = int(input()) if x == 0: ans_list.append("Y") else: ans_list.append("N") for i in ans_list: print(i)