Monstadt’s honorable knights are enjoying their summer vacation in a distant archipelago named Golden Apple. The youngest member of the group, Klee has found some sea shells and started playing with them. But eventually she got bored and thought of a game to play with others.
She called the acting grand master Jean to come and play with her. She will place a number of shells she found in the beach and she will take a certain amount of shells each turn. Then Jean will do the same. They will repeat the process until there is no shell remaining. The person to take the last shell will win the game. Klee will always go first and Jean will follow.
Input will contain () the number of test cases.
lines will follow each having two integers , (); where denotes the number of shells Klee found and denotes the maximum number of shells each person can pick at each turn.
One has to take at least one shell each turn and both Klee and Jean will play the game optimally.
Output as following: Case #x: (the name of the winner); where is the number of test case.
Input | Output |
---|---|
1 3 1 | Case #1: Klee |
There are three shells and one can pick one shell each turn. If they play optimally Klee will win as following steps
|
Input | Output |
---|---|
1 3 2 | Case #1: Jean |