{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"\u003ch3\u003e Read problems statements in \u003ca target\u003d\"_blank\" href\u003d\"https://www.codechef.com/download/translated/NOV13/mandarin/CHEFGM.pdf\" rel\u003d\"nofollow noreferrer noopener\"\u003e Mandarin Chinese \u003c/a\u003e and \u003ca target\u003d\"_blank\" href\u003d\"https://www.codechef.com/download/translated/NOV13/russian/CHEFGM.PDF\" rel\u003d\"nofollow noreferrer noopener\"\u003e Russian\u003c/a\u003e.\u003c/h3\u003e\n\u003cp\u003eChef Ciel is playing a game with one of her colleagues.\u003cbr /\u003e\u003cbr /\u003e In this game, there are \u003cem\u003ek\u003c/em\u003e piles of numbers. There are \u003cem\u003eni\u003c/em\u003e numbers in \u003cem\u003ei\u003c/em\u003eth pile. In each move, player has to select a pile and finally a number from that pile. After that, all the numbers which are greater than or equal to chosen number will be removed from that pile. Players take turn alternatively. Player who is unable to move loses the game. \u003c/p\u003e\n\u003cp\u003eChef Ciel always make first move. But before making her move, she must choose either EVEN or ODD. If she chooses even then each time she selects a number it must be even and her opponent must select odd number in his/her turn. And vice versa for the other case. \u003c/p\u003e\n\u003cp\u003ePlease help Chef Ciel to make her choice. If neither choice can make her win game, print DON\u0027T PLAY otherwise EVEN or ODD depending on which choice she should make to win game. If you think then you will understand BOTH can not be answer.\u003c/p\u003e\n\u003cp\u003eAssume that both players play intelligently, if they can force win they will. \u003cbr /\u003e\u003cbr /\u003e\u003cstrong\u003eInput : \u003c/strong\u003e\u003cbr /\u003e First line of test case contains t, number of test cases.\u003cbr /\u003e Then t test cases follow. First line of each test case contains k, number of piles. \u003cbr /\u003e Then description of k piles follow. \u003cem\u003ei\u003c/em\u003eth pile description contains number \u003cem\u003eni\u003c/em\u003e, then \u003cem\u003eni\u003c/em\u003e numbers follow in the same line.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eOutput :\u003c/strong\u003e \u003cbr /\u003e Print \"EVEN\", \"ODD\" or \"DON\u0027T PLAY\" accordingly.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConstraints : \u003cbr /\u003e\u003c/strong\u003e t \u003c\u003d 1000, k \u003c\u003d100, ni \u003c\u003d 45. Numbers in pile will be non-negative and less than 2^31.\u003c/p\u003e\n\u003cp\u003e \u003c/p\u003e"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n2 \n2 3 4\n2 4 5\n1\n3 1 2 3\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eDON\u0027T PLAY\nODD\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\nIn the first test case, if you have chosen ODD to play with, it means you will select only ODD numbers and your opponent may choose only EVEN numbers. So you have two options. Either select 3 from first pile or 5 from second pile. If 3 is selected, 3 and 4 are removed from first pile and in next move your opponent\u0027s only move will be 4 from second pile removing every numbers thus you lose. If you had selected 5, then your opponent\u0027s optimal move would be selecting 4 from first pile. Next you will select 3 and your opponent 4 leaving nothing for you. So if you choose ODD you will lose. Similarly if you choose EVEN you will lose as well. So the answer is DON\u0027T Play.\n\n\u003cp\u003e\u003c/p\u003e\nIn the second case, if you choose ODD just select 1 and you will win. If you choose EVEN you have only one move that is 2, and in response your opponent will choose 1 and leave you nothing. Thus answer is ODD."}}]}