for _ in range(int(input())): N = int(input()) if N >= 2: print('K') else: print('P')