for _ in range(int(input())): n = int(input()) print('KP'[n == 1])