t = int(input()) for i in range(t): n = int(input()) if n == 1: print("P") else: print("K")