After struggling with bill splitting in Where's My Money?, OC and KP decided to settle things a different way: by having a barbecue. But unfortunately, XW didn't come this time — probably still struggling with floating-point errors.
When it came time to pay the bill, they still couldn't agree on a fair method. So, as any reasonable programmers would, they decided to play a game with the leftover bamboo skewers to determine who pays.
The rules are as follows:
Assuming both OC and KP play optimally, determine who will win.
There are multiple test cases. The first line of the input contains an integer $$$t$$$ $$$(1 \leq t \leq 10^5)$$$, denoting the number of test cases. For each test case:
The first and only line contains two integers $$$x$$$ and $$$k$$$ $$$(1 \le x, k \le 10^{18})$$$, denoting the initial number of skewers and the starting value of $$$k$$$.
For each test case, output one line containing one string: either OC or KP, denoting the winner under optimal play.
34 42 1100000000 10
OC OC KP
For the first sample test case, OC can take all $$$4$$$ skewers on their first move. Then it's KP's turn, but there are no skewers left, so KP cannot make a move. OC wins.
For the second sample test case, OC can only take $$$1$$$ skewer on the first move (since $$$k = 1$$$). After that, $$$k$$$ becomes $$$0$$$, and it's KP's turn — but with $$$k = 0$$$, no move is allowed. OC wins again.
For the third sample test case, obviously they will never exhaust all $$$10^8$$$ skewers before $$$k$$$ reaches $$$0$$$. Since $$$k$$$ decreases by $$$1$$$ after each move, there will be exactly $$$10$$$ moves in total. And OC moves first; therefore, the $$$10$$$th and final move belongs to KP, so KP wins.
But the real problem is, who's going to pay for these $$$100$$$ million skewers?