408502: GYM103158 G Game with Strings

Memory Limit:256 MB Time Limit:5 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

G. Game with Stringstime limit per test5 secondsmemory limit per test256 megabytesinputgame.inoutputstandard output

Pillow and Khaled Hamed are playing a game with an array of strings $$$a$$$. Pillow Starts First.

Each player on his turn will choose a non-empty subset of indices $$$S$$$ such that $$$A_x = A_y$$$ and $$$1 \leq |A_x| $$$ for each $$$x$$$ and $$$y$$$ in $$$S$$$ and remove the last character from $$$A_x$$$ for all $$$x$$$ in $$$S$$$.

The player who can't make a move loses the game.

KEE the king of games deduced that if both players play optimally the winner can be decided at the beginning of the game can you find out who that winner is for our king?.

Input

The first line consists of a single integer $$$T$$$ $$$(1 \leq T \leq 100)$$$, denoting the number of test cases.

Each test case contains two lines.

On the first line, a single integer $$$N$$$ $$$(1 \leq N \leq 10^5)$$$, denoting the number of strings.

On the second line, the array $$$A$$$ where $$$(1 \leq |A_i| \leq 10^5)$$$ and $$$A_i$$$ consists only of lowercase Latin letters.

It's guaranteed that the sum of strings sizes over all test cases is $$$\leq 10^7$$$

Output

For each test case, print a single line containing the name of the winner "Pillow" or "Khaled".

ExampleInput
2
10
a a abc ab abc abc bbb bbbb bbbx bbby
6
a b c d e f
Output
Khaled
Khaled

Source/Category

加入题单

算法标签: