Moorbles
시간 제한2초메모리 제한1024 MB
모든 경우에 엘시가 파산하지 않도록 각 턴의 Even/Odd를 정하되 사전순으로 가장 앞선 수열을 구한다.
문제
Bessie and Elsie are playing a game of Moorbles. The game works as follows: Bessie and Elsie each start out with some amount of marbles. Bessie holds out of her marbles in her hoof and Elsie guesses if is Even or Odd. If Elsie is correct, she wins the marbles from Bessie and if she guesses incorrectly, she loses of her marbles to Bessie (if Elsie has less than marbles, she loses all her marbles). A player loses when they lose all of their marbles.
After some amount of turns in the game, Elsie has marbles. She thinks it is hard to win, but she is playing to not lose. After being around Bessie enough, Elsie has a good read on Bessie's habits and recognizes that on turn , there are only different amounts of marbles that Bessie may put out. There are only turns before Bessie gets bored and stops playing. Can you identify a lexicographically minimum turn sequence such that Elsie will not lose, regardless of how Bessie plays?
입력
The first line contains a single integer () representing the number of test cases. Each test case is described as follows:
- First, one line containing three integers , , and , representing the number of marbles Elsie has, the number of turns, and the number of potential moves Bessie can make respectively.
- Then, lines where line contains distinct space separated integers () representing the possible amounts of marbles that Bessie might play on turn .
It is guaranteed that the sum of over all test cases is at most .
출력
For each test case, output the lexicographically minimum move sequence for Elsie to guarantee not losing, or if she will lose. The move sequence should be on a single line and consist of space-separated tokens each equal to either "Even" or "Odd".
Note: "Even" is lexicographically smaller than "Odd".