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