Read problems statements in  Mandarin Chinese  and  Russian. 
Chef Ciel is playing a game with one of her colleagues.

In this game, there are k piles of numbers. There are ni numbers in ith 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. 
Chef 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. 
Please help Chef Ciel to make her choice. If neither choice can make her win game, print DON'T 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.
Assume that both players play intelligently, if they can force win they will. 

Input : 
First line of test case contains t, number of test cases.
Then t test cases follow. First line of each test case contains k, number of piles. 
Then description of k piles follow. ith pile description contains number ni, then ni numbers follow in the same line.
Output : 
Print "EVEN", "ODD" or "DON'T PLAY" accordingly.
Constraints : 
t ≤ 1000, k ≤100, ni ≤ 45. Numbers in pile will be non-negative and less than 2^{31}.
 
----- Sample Input 1 ------ 
2
2 
2 3 4
2 4 5
1
3 1 2 3
----- Sample Output 1 ------ 
DON'T PLAY
ODD
----- explanation 1 ------ 
In 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's only move will be 4 from second pile removing every numbers thus you lose. If you had selected 5, then your opponent's 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'T Play.

In 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.

Difficulty: HARD
Tags: Game theory

Starter code:

Solutions:
T = int(input())
while T > 0:
	K = int(input())
	score = 0
	for i in range(K):
		line = [int(x) for x in input().split()]
		size = line[0]
		arr = line[1:]
		arr.sort()
		parity = arr[0] % 2
		num = 0
		check = False
		powerReduce = 0
		for j in arr:
			if j % 2 != parity:
				check = True
			if check:
				powerReduce = powerReduce + 1
			if j % 2 == 1:
				num = num + (1 << 45 - powerReduce)
			else:
				num = num - (1 << 45 - powerReduce)
		score = score + num
	if score > 0:
		print('ODD')
	elif score < 0:
		print('EVEN')
	else:
		print("DON'T PLAY")
	T = T - 1


for _ in range(int(input())):
	n = int(input())
	hack = 0
	for i in range(n):
		l = [int(i) for i in input().split()]
		l = l[1:]
		l = sorted(l)
		hack1 = 0
		karma = 0
		divider = 1.0
		par = l[0] % 2 == 0
		if par == 1:
			hack1 += 1
		else:
			hack1 -= 1
		for i in range(1, len(l)):
			if karma == 0:
				if l[i] % 2 == 0 and par == 1:
					hack1 += divider
				elif l[i] % 2 == 0 and par == 0:
					divider = 1 / 2
					hack1 += divider
					karma = 1
				elif l[i] % 2 == 1 and par == 0:
					hack1 -= divider
				elif l[i] % 2 == 1 and par == 1:
					divider = 1 / 2
					hack1 -= divider
					karma = 1
			else:
				divider = divider / 2
				if l[i] % 2 == 0:
					hack1 += divider
				else:
					hack1 -= divider
		hack += hack1
	if hack == 0:
		print("DON'T PLAY")
	elif hack > 0:
		print('EVEN')
	else:
		print('ODD')