import sys input = sys.stdin.readline t = int(input()) for _ in [0] * t: n = int(input()) if(n == 1): print('P') else: print('K')