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