We all know Gru loves Agnes very much. One day Agnes asked Gru to answer some of her queries. She lined up $N$ minions in a straight line from $1$ to $N$. 
You are given an array $A$ which contains the height of minions. Agnes will ask him several queries. In each query, Gru has to tell whether the bitwise AND of  $A[L \ldots R]$ is EVEN or ODD. Since Gru is busy planning the biggest heist on Earth, he asks for your help.

-----Input:-----
- First line of the input contains an integer $T$ denoting the number of test cases.
For each test case:-
- First line contains an integer $N$ denoting the number of elements.
- Second line contains $N$ spaced integer representing array elements.
- Third line contains $Q$ representing number of query.
- Next $Q$ lines contains two integer $L$ and $R$ as defined above.

-----Output:-----
For each query, output "EVEN" or "ODD" without quotes.

-----Constraints-----
- $1 \leq T \leq 10$
- $1 \leq N \leq 10^5$
- $1 \leq A_i \leq 10^5$
- $1 \leq Q \leq 10^5$

-----Sample Input:-----
1
5
1 3 2 4 5
3
1 2 
1 5
3 4

-----Sample Output:-----
ODD
EVEN
EVEN

-----Explanation-----
- For the first query, the bitwise AND of 1 and 3 is 1, which is Odd. Hence the first output is ODD.
- For the third query, the bitwise AND of 2 and 4 is 0, which is Even. Hence the third output is EVEN.

Difficulty: MEDIUM
Tags: Bit manipulation

Mathematics
Skill types: Bit manipulation

Starter code:

Solutions:
t = int(input())
while t:
	t = t - 1
	n = int(input())
	a = list(map(int, input().split()))
	fin = []
	fin.append(0)
	for i in range(n):
		if a[i] % 2 == 0:
			p = fin[-1]
			fin.append(p + 1)
		else:
			p = fin[-1]
			fin.append(p)
	q = int(input())
	while q > 0:
		q = q - 1
		(r, ti) = list(map(int, input().split()))
		m = fin[ti]
		n = fin[r - 1]
		even = m - n
		if even == 0:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	m = [0]
	c = 0
	l1 = list(map(int, input().split()))
	for i in range(len(l1)):
		if l1[i] % 2 == 0:
			c += 1
		m.append(c)
	for _ in range(int(input())):
		(l, r) = list(map(int, input().split()))
		s = m[r] - m[l - 1]
		if s == 0:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	li = list(map(int, input().split()))
	su = 0
	arr = [0]
	for i in li:
		if i % 2 == 0:
			arr.append(su + 1)
			su += 1
		else:
			arr.append(su)
	for _ in range(int(input())):
		(l, r) = map(int, input().split())
		flag = 0
		if arr[r] - arr[l - 1] > 0:
			print('EVEN')
		else:
			print('ODD')


T = int(input())
for i in range(T):
	N = int(input())
	arr = list(map(int, input().split()))
	Q = int(input())
	lis = []
	for (x, y) in enumerate(arr):
		if y % 2 == 0:
			lis.append(x + 1)
	for j in range(Q):
		(L, R) = map(int, input().split())
		done = False
		for k in lis:
			if k >= L and k <= R:
				print('EVEN')
				done = True
				break
		if not done:
			print('ODD')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	MAT = [0]
	cur = 0
	for i in range(n):
		a[i] = str(bin(a[i]))[-1]
		if a[i] == '0':
			cur += 1
		MAT.append(cur)
	for i in range(int(input())):
		(l, r) = map(int, input().split())
		if MAT[r] - MAT[l - 1] == 0:
			print('ODD')
		else:
			print('EVEN')


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	q = int(input())
	res = list()
	for i in range(n):
		if a[i] % 2 == 0:
			res.append(i)
	for i in range(q):
		flag = 1
		(l, r) = list(map(int, input().split()))
		l = l - 1
		r = r - 1
		for j in res:
			if j >= l and j <= r:
				flag = 0
		if flag != 0:
			print('ODD')
		else:
			print('EVEN')
	t -= 1


for _ in range(int(input())):
	n = int(input())
	lis = list(map(int, input().split()))
	q = int(input())
	s = ''
	for i in range(n):
		if lis[i] & 1 == 0:
			s += '0'
		else:
			s += '1'
	for _ in range(q):
		x = list(map(int, input().split()))
		l = x[0]
		r = x[1]
		temp = '1' * (r + 1 - l)
		if temp == s[l - 1:r]:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	cnt = 0
	l = [0]
	for i in range(n):
		if not arr[i] & 1:
			cnt += 1
		l.append(cnt)
	for _ in range(int(input())):
		(a, b) = map(int, input().split())
		if l[a - 1] == l[b]:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	N = int(input())
	L = list(map(int, input().split()))
	L.insert(0, 0)
	Q = int(input())
	arr1 = [0]
	c = 0
	for i in range(1, N + 1):
		if L[i] % 2 != 0:
			c += 1
		arr1.append(c)
	while Q:
		(L, R) = map(int, input().split())
		x = R - L + 1
		odd = arr1[R] - arr1[L - 1]
		arr2 = x - odd
		if arr2 == 0:
			print('ODD')
		else:
			print('EVEN')
		Q -= 1


for _ in range(int(input())):
	lens = int(input())
	arrs = [int(x) for x in input().split()]
	even = [i for (i, x) in enumerate(arrs) if x % 2 == 0]
	nbq = int(input())
	for _ in range(nbq):
		answer = 'ODD'
		(l, r) = [int(x) for x in input().split()]
		for j in even:
			if l - 1 <= j < r:
				answer = 'EVEN'
				break
		print(answer)


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	x = int(input())
	a = []
	qq = [0] * len(l)
	ss = 0
	for i in range(len(l)):
		if l[i] % 2 == 0:
			ss += 1
			qq[i] = ss
		else:
			qq[i] = ss
	for i in range(x):
		c = list(map(int, input().split()))
		a.append(c)
	for i in range(x):
		zz = abs(qq[a[i][0] - 1] - qq[a[i][1] - 1])
		if zz > 0 or l[a[i][0] - 1] % 2 == 0:
			print('EVEN')
		else:
			print('ODD')


t = int(input())
for _ in range(t):
	n = int(input())
	m = list(map(int, input().split()))
	p = []
	temp = 0
	for i in range(n):
		if m[i] % 2 == 0:
			m[i] = 0
		else:
			m[i] = 1
		temp = temp + m[i]
		p.append(temp)
	ans = []
	q = int(input())
	for i in range(q):
		(a, b) = list(map(int, input().split()))
		(a, b) = (a - 1, b - 1)
		if a >= 1:
			temp = p[b] - p[a - 1]
		else:
			temp = p[b]
		if temp == b - a + 1:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	a = [x & 1 for x in a] + [0]
	q = int(input())
	ran = []
	l = None
	r = None
	for i in range(n + 1):
		if a[i] == 1:
			if l == None:
				l = i
		elif a[i] == 0:
			if l != None:
				if r == None:
					r = i - 1
					ran.append([l, r])
					l = r = None
	for i in range(q):
		(l1, r1) = map(int, input().split())
		(l1, r1) = (l1 - 1, r1 - 1)
		if len(ran) == 0:
			print('EVEN')
		else:
			bl = False
			for i in ran:
				if l1 >= i[0] and r1 <= i[1]:
					bl = True
					break
			if bl:
				print('ODD')
			else:
				print('EVEN')


t = int(input())
while t:
	n = int(input())
	a = list(map(int, input().split()))
	b = []
	c = 0
	for i in range(0, len(a)):
		if a[i] % 2 == 0:
			c = c + 1
		b.append(c)
	q = int(input())
	while q:
		c = list(map(int, input().split()))
		if b[c[1] - 1] - b[c[0] - 1] > 0 or a[c[0] - 1] % 2 == 0:
			print('EVEN')
		else:
			print('ODD')
		q = q - 1
	t = t - 1


testcase = int(input())
for _ in range(testcase):
	n = int(input())
	bxx = []
	bxx.append(0)
	a = list(map(int, input().split()))
	for i in range(n):
		if a[i] % 2 == 0:
			bxx.append(bxx[-1] + 1)
		else:
			bxx.append(bxx[-1])
	for i in range(int(input())):
		(ll, rr) = map(int, input().split())
		k = bxx[rr] - bxx[ll - 1]
		if k != 0:
			print('EVEN')
		else:
			print('ODD')


t = int(input())
for _ in range(t):
	n = int(input())
	y = list(map(int, input().split()))
	arr = [0] * n
	if y[0] % 2 == 0:
		arr[0] = 1
	i = 1
	while i < n:
		if y[i] % 2 == 0:
			arr[i] = arr[i - 1] + 1
		else:
			arr[i] = arr[i - 1]
		i += 1
	q = int(input())
	for i in range(q):
		(l, r) = map(int, input().split())
		if y[l - 1] % 2 == 0 or y[r - 1] % 2 == 0 or arr[r - 1] - arr[l - 1] >= 1:
			print('EVEN')
		else:
			print('ODD')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	q = int(input())
	s = [0 for i in range(n)]
	ev = 0
	for i in range(n):
		if arr[i] % 2 == 0:
			ev += 1
		s[i] = ev
	for i in range(q):
		(l, r) = list(map(int, input().split()))
		l -= 1
		r -= 1
		if arr[l] % 2 == 0 or arr[r] % 2 == 0:
			print('EVEN')
			continue
		diff = s[r] - s[l]
		if diff > 0:
			print('EVEN')
		else:
			print('ODD')


for t in range(int(input())):
	lis = []
	n = int(input())
	arr = list(map(int, input().split()))
	for i in range(n):
		if arr[i] % 2 == 0:
			lis.append(i)
	q = int(input())
	for i in range(q):
		flag = 1
		(l, r) = map(int, input().split())
		for j in range(len(lis)):
			if lis[j] >= l - 1 and lis[j] < r:
				print('EVEN')
				flag = 0
			if flag == 0:
				break
		if flag == 1:
			print('ODD')


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	li = []
	lis = list(map(int, input().split()))
	for i in range(n):
		if lis[i] % 2 == 0:
			li.append(i)
	q = int(input())
	for i in range(q):
		(l, r) = map(int, input().split())
		f = 0
		for j in li:
			if l - 1 <= j and j < r:
				f = 1
				break
			if j >= r:
				break
		if f == 1:
			print('EVEN')
		else:
			print('ODD')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	q = int(input())
	ans = [0] * n
	for i in range(n):
		if a[i] % 2 == 0:
			ans[i] = 0
		else:
			ans[i] = 1000000
	j = 0
	curr = -1000000
	while j < n:
		if ans[j] == 0:
			curr = j
			j += 1
		else:
			ans[j] = j - curr
			j += 1
	for i in range(q):
		(L, R) = map(int, input().split())
		l = L - 1
		r = R - 1
		if ans[r] < 0:
			print('ODD')
		elif r - l < ans[r]:
			print('ODD')
		else:
			print('EVEN')


t = int(input())
for i in range(t):
	n = int(int(input()))
	p = list(map(int, input().split()))
	e = [0] * (n + 1)
	for j in range(n):
		if p[j] % 2 == 0:
			e[j + 1] = e[j] + 1
		else:
			e[j + 1] = e[j]
	q = int(input())
	for j in range(q):
		(x, y) = map(int, input().split())
		ans1 = e[y] - e[x - 1]
		if ans1 == 0:
			print('ODD')
		else:
			print('EVEN')


t = int(input())
for cases in range(t):
	n = int(input())
	arr = list(map(int, input().strip().split()))
	odd = [0] * n
	if arr[0] % 2 == 1:
		odd[0] = 1
	for i in range(1, n):
		if arr[i] % 2 == 1:
			odd[i] = 1
		odd[i] += odd[i - 1]
	qu = int(input())
	for q in range(qu):
		(l, r) = map(int, input().split())
		l = l - 1
		r = r - 1
		flag = 0
		c = odd[r]
		if l > 0:
			c -= odd[l - 1]
		if c == r - l + 1:
			print('ODD')
		else:
			print('EVEN')


for i in range(int(input())):
	n = int(input())
	h = [int(j) for j in input().split()]
	pre_h = [0] * (n + 1)
	for j in range(len(h)):
		if h[j] % 2 == 0:
			pre_h[j + 1] = pre_h[j] + 1
		else:
			pre_h[j + 1] = pre_h[j]
	for j in range(int(input())):
		(l, r) = map(int, input().split())
		ans = pre_h[r] - pre_h[l - 1]
		if ans > 0:
			print('EVEN')
		else:
			print('ODD')


t = int(input())
for test in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	check = [0 for i in range(n + 2)]
	for i in range(n):
		check[i + 1] = check[i]
		if arr[i] % 2 == 0:
			check[i + 1] += 1
	q = int(input())
	for i in range(q):
		(l, r) = list(map(int, input().split()))
		if check[r] - check[l - 1] > 0:
			print('EVEN')
		else:
			print('ODD')


t = int(input())
for o in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	q = int(input())
	l1 = []
	c = 0
	for i in l:
		if i % 2 == 0:
			c += 1
			l1.append(c)
		else:
			l1.append(c)
	for v in range(q):
		(l, r) = map(int, input().split())
		l -= 1
		r -= 1
		if l == 0:
			if l1[r] > 0:
				print('EVEN')
			else:
				print('ODD')
		else:
			l -= 1
			x = l1[r] - l1[l]
			if x > 0:
				print('EVEN')
			else:
				print('ODD')


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	p = [0] * n
	c = 0
	for (j, k) in enumerate(l):
		if k & 1:
			p[j] = c
		else:
			c += 1
			p[j] = c
	q = int(input())
	for j in range(q):
		(a, r) = list(map(int, input().split()))
		x = p[r - 1] - p[a - 1]
		if l[a - 1] % 2 == 0:
			x += 1
		print('EVEN' if x > 0 else 'ODD')


for t in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	q = int(input())
	b = [0] * (n + 1)
	x = 0
	for i in range(n):
		if a[i] % 2 == 0:
			x += 1
		b[i + 1] = x
	for i in range(q):
		(l, r) = map(int, input().split())
		c = b[r] - b[l - 1]
		if c != 0:
			print('EVEN')
		else:
			print('ODD')


t = int(input())
for i in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	pr_even = [0] * n
	curr_even = 0
	for (i, j) in enumerate(arr):
		if j & 1:
			pr_even[i] = curr_even
		else:
			curr_even += 1
			pr_even[i] = curr_even
	q = int(input())
	for i in range(q):
		(l, r) = list(map(int, input().split()))
		ev = pr_even[r - 1] - pr_even[l - 1]
		if arr[l - 1] % 2 == 0:
			ev += 1
		if ev > 0:
			print('EVEN')
		else:
			print('ODD')


t = int(input())
while t > 0:
	n = int(input())
	a = [int(ele) for ele in input().split()]
	for i in range(n):
		num = bin(a[i])
		if num[-1] == '1':
			a[i] = 1
		else:
			a[i] = 0
		if i != 0:
			a[i] += a[i - 1]
	q = int(input())
	while q > 0:
		(l, r) = [int(ele) for ele in input().split()]
		x = a[r - 1]
		if l == 1:
			y = 0
		else:
			y = a[l - 2]
		if x - y == r - l + 1:
			print('ODD')
		else:
			print('EVEN')
		q -= 1
	t -= 1


from sys import stdin
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	nl = [0] + [x & 1 for x in map(int, stdin.readline().split())]
	for i in range(1, n + 1):
		nl[i] += nl[i - 1]
	q = int(stdin.readline())
	for i in range(q):
		(l, r) = map(int, stdin.readline().split())
		if nl[r] - nl[l - 1] == r - l + 1:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	q = int(input())
	f = [0] * n
	for i in range(n):
		if a[i] % 2 == 1:
			f[i] += 1
		if i > 0:
			f[i] += f[i - 1]
	for i in range(q):
		(l, r) = map(int, input().split())
		l -= 1
		r -= 1
		if l == 0:
			if f[r] == r - l + 1:
				print('ODD')
			else:
				print('EVEN')
		elif f[r] - f[l - 1] == r - l + 1:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	m = int(input())
	prefix = [0 for i in range(n)]
	if l[0] % 2 == 0:
		prefix[0] = 1
	else:
		prefix[0] = 0
	for k in range(1, n):
		if l[k] % 2 == 0:
			prefix[k] = prefix[k - 1] + 1
		else:
			prefix[k] = prefix[k - 1]
	for i in range(m):
		(l, r) = map(int, input().split())
		l -= 1
		r -= 1
		if prefix[r] - prefix[max(0, l - 1)] > 0:
			print('EVEN')
		else:
			print('ODD')


import bisect
t = int(input())
for _ in range(t):
	n = int(input())
	a = list(map(int, input().split()))
	q = int(input())
	an = []
	tot = a[0]
	even = []
	su = 0
	for i in range(n):
		if a[i] % 2 == 0:
			even += [0]
		else:
			even += [1]
		su += even[i]
		an += [su]
	for i in range(q):
		(l, r) = map(int, input().split())
		if l == 1:
			te = 0
		else:
			te = an[l - 2]
		if an[r - 1] - te < r - l + 1:
			print('EVEN')
		elif l == r:
			if a[l - 1] % 2 == 0:
				print('EVEN')
			else:
				print('ODD')
		else:
			print('ODD')


for i in range(int(input())):
	n = int(input())
	y = [int(x) for x in input().split()]
	y = [x % 2 for x in y]
	lst = [0]
	lst.extend(y)
	for j in range(n + 1):
		if lst[j] == 0:
			lst[j] = lst[j - 1] + 1
		else:
			lst[j] = lst[j - 1]
	for j in range(int(input())):
		(l, r) = map(int, input().split())
		if lst[r] - lst[l - 1] > 0:
			print('EVEN')
		else:
			print('ODD')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = list(map(int, input().split()))
	q = int(input())
	prefix = []
	c = 0
	for i in range(len(arr)):
		if arr[i] % 2 == 0:
			c += 1
		prefix.append(c)
	for query in range(q):
		(l, r) = map(int, input().split())
		if l == r:
			if arr[l - 1] % 2 == 0:
				print('EVEN')
			else:
				print('ODD')
		elif l != r and prefix[r - 1] - prefix[l - 1] == 0 and (arr[l - 1] % 2 != 0):
			print('ODD')
		else:
			print('EVEN')


from bisect import *
t = int(input())
while t:
	t -= 1
	n = int(input())
	a = list(map(int, input().split()))
	a.append(0)
	ref = []
	l = 1
	r = 0
	for i in range(n + 1):
		if a[i] % 2:
			r += 1
		else:
			if l and r:
				ref.append([l, r + l - 1])
				l = i + 2
				r = 0
			l = i + 2
	ref1 = []
	for i in ref:
		ref1.append([i[1], i[0]])
	q = int(input())
	while q:
		q -= 1
		(l, r) = map(int, input().split())
		it = bisect_left(ref1, [l])
		if l >= ref1[it][1] and r <= ref1[it][0]:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	p = []
	cnt = 0
	for i in range(n):
		if a[i] % 2 == 0:
			cnt += 1
			p.append(cnt)
			cnt += 1
			continue
		p.append(cnt)
	for _ in range(int(input())):
		(l, r) = map(int, input().split())
		if p[r - 1] - p[l - 1] > 0:
			print('EVEN')
		else:
			print('ODD')


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	h = [0] * n
	c = 0
	if l[0] % 2 == 1:
		h[0] = 1
	for i in range(1, n):
		if l[i] % 2 == 0:
			c = 0
		else:
			c = 1
		h[i] = c + h[i - 1]
	k = int(input())
	for i in range(k):
		(j, r) = map(int, input().split())
		if j == 1:
			if h[r - 1] == r - j + 1:
				print('ODD')
			else:
				print('EVEN')
		elif h[r - 1] - h[j - 2] == r - j + 1:
			print('ODD')
		else:
			print('EVEN')


from itertools import accumulate
t = int(input())
for _ in range(0, t):
	n = int(input())
	a = [(int(i) + 1) % 2 for i in input().split()]
	qq = list(accumulate(a))
	q = int(input())
	for _ in range(0, q):
		(l, r) = map(int, input().split())
		l -= 1
		r -= 1
		ans = qq[r] - qq[max(0, l - 1)]
		if ans > 0:
			print('EVEN')
		else:
			print('ODD')


for _ in range(int(input())):
	n = int(input())
	l = list(map(int, input().split()))
	(k, c) = ([], 0)
	for i in l:
		if i % 2 == 0:
			c += 1
		k.append(c)
	q = int(input())
	for i in range(q):
		(a, b) = map(int, input().split())
		a -= 1
		b -= 1
		if a == 0:
			if k[b] > 0:
				print('EVEN')
			else:
				print('ODD')
		else:
			a -= 1
			x = k[b] - k[a]
			if x > 0:
				print('EVEN')
			else:
				print('ODD')


for _ in range(int(input())):
	n = int(input())
	ln = list(map(int, input().split()))
	i = 0
	s = []
	while i < len(ln):
		if ln[i] % 2 == 0:
			s.append(i)
		i += 1
	for _ in range(int(input())):
		(l, r) = map(int, input().split())
		l -= 1
		r -= 1
		flag = 1
		for j in s:
			if j >= l and j <= r:
				flag = 0
				break
		if flag:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	count = 0
	avg = []
	for i in range(n):
		if a[i] % 2 == 0:
			avg.append(count)
			count = count + 1
		else:
			avg.append(count)
	q = int(input())
	for i in range(q):
		(l, m) = map(int, input().split())
		if avg[l - 1] == avg[m - 1]:
			if a[m - 1] % 2 == 1:
				print('ODD')
			else:
				print('EVEN')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	a = [int(x) for x in input().split()]
	sum = 0
	for i in range(n):
		if a[i] % 2 == 0:
			sum += 1
		a[i] = sum
	q = int(input())
	while q:
		(l, r) = map(int, input().split())
		if l != 1:
			c = a[r - 1] - a[l - 2]
		else:
			c = a[r - 1]
		if c == 0:
			print('ODD')
		else:
			print('EVEN')
		q -= 1


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().strip().split()))
	res = [0 for i in range(n)]
	if l[0] % 2 == 0:
		res[0] = 1
	for i in range(1, n):
		if l[i] % 2 == 0:
			res[i] = res[i - 1] + 1
		else:
			res[i] = res[i - 1]
	q = int(input())
	for i in range(q):
		(l, r) = list(map(int, input().strip().split()))
		if l == 1:
			if res[r - 1] > 0:
				print('EVEN')
			else:
				print('ODD')
		elif res[r - 1] - res[l - 2] > 0:
			print('EVEN')
		else:
			print('ODD')


T = int(input())
for _ in range(T):
	N = int(input())
	List = [int(x) for x in input().split()]
	Even_Odd = str()
	for i in List:
		if i % 2 == 0:
			Even_Odd += '0'
		else:
			Even_Odd += '1'
	Q = int(input())
	for i in range(Q):
		(l, r) = [int(x) for x in input().split()]
		if '0' in Even_Odd[l - 1:r]:
			print('EVEN')
		else:
			print('ODD')


T = int(input())
for t in range(T):
	N = int(input())
	a = list(map(int, input().split()))
	Q = int(input())
	c = 0
	for i in range(len(a)):
		if a[i] % 2 == 0:
			c += 1
		a[i] = c
	a.insert(0, 0)
	for q in range(Q):
		(L, R) = map(int, input().split())
		if a[L - 1] - a[R] == 0:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	list1 = list(map(int, input().split()))
	list2 = []
	for i in range(n):
		if list1[i] % 2 == 0:
			list2.append(i)
	q = int(input())
	for i in range(q):
		flag = 0
		(l, r) = map(int, input().split())
		for j in range(len(list2)):
			if list2[j] < r and list2[j] >= l - 1:
				print('EVEN')
				flag = 1
				break
		if flag == 0:
			print('ODD')


for _ in range(int(input())):
	n = int(input())
	a = [i & 1 for i in map(int, input().split())]
	z = [-1] * n
	r = -1
	for i in range(n):
		if a[i] == 0:
			r = i
		z[i] = r + 1
	for j in range(int(input())):
		(l, r) = map(int, input().split())
		print(['EVEN', 'ODD'][z[r - 1] < l])


t = int(input())
for i in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	queries = int(input())
	l2 = []
	for (j, i) in enumerate(l):
		if i % 2 == 0:
			l2.append(j)
	for i in range(queries):
		j = list(map(int, input().split()))
		for i in l2:
			if i >= j[0] - 1 and i <= j[1] - 1:
				print('EVEN')
				break
		else:
			print('ODD')


for _ in range(int(input())):
	n = int(input())
	li = [int(x) for x in input().split()]
	d = {}
	ff = -1
	for i in range(n):
		d[i] = ff
		if li[i] & 1 == 0:
			ff = i
	q = int(input())
	for i in range(q):
		(l, r) = map(int, input().split())
		l -= 1
		r -= 1
		if li[r] & 1 == 0:
			print('EVEN')
			continue
		if d[r] >= l:
			print('EVEN')
		else:
			print('ODD')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	pre = [0] * n
	for i in range(n):
		if a[i] % 2 == 0:
			if i == 0:
				pre[i] = 1
			else:
				pre[i] = pre[i - 1] + 1
		else:
			pre[i] = pre[i - 1]
	for i in range(int(input())):
		(l, r) = map(int, input().split())
		(l, r) = (l - 1, r - 1)
		temp = 0
		if l == 0:
			temp = pre[r]
		else:
			temp = pre[r] - pre[l - 1]
		if temp > 0:
			print('EVEN')
		else:
			print('ODD')


import sys
T = int(input())
for _ in range(T):
	N = int(input())
	L = list(map(int, sys.stdin.readline().split()))
	Q = int(input())
	array = [0] * (N + 1)
	odd = 0
	for i in range(N):
		if L[i] % 2 != 0:
			odd += 1
			array[i + 1] = odd
		else:
			array[i + 1] = odd
	for i in range(Q):
		(l, R) = map(int, sys.stdin.readline().split())
		if array[l] == array[l - 1]:
			print('EVEN')
			continue
		if R - l == array[R] - array[l]:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	N = int(input())
	List = [int(x) for x in input().split()]
	Even_Odd = str()
	for i in List:
		if i % 2 == 0:
			Even_Odd += '0'
		else:
			Even_Odd += '1'
	Q = int(input())
	for i in range(Q):
		(L, R) = [int(x) for x in input().split()]
		if '0' in Even_Odd[L - 1:R]:
			print('EVEN')
		else:
			print('ODD')


T = int(input())
ans = []
for _ in range(T):
	N = int(input())
	A = [int(i) for i in input().split()]
	Q = int(input())
	prefix = []
	count = 0
	for i in range(N):
		if A[i] % 2 == 0:
			count += 1
		prefix.append(count)
	for i in range(Q):
		(l, r) = [int(i) for i in input().split()]
		if l == r:
			if A[l - 1] % 2 == 0:
				ans.append('EVEN')
			else:
				ans.append('ODD')
		elif r != l and A[l - 1] % 2 != 0 and (prefix[r - 1] - prefix[l - 1] == 0):
			ans.append('ODD')
		else:
			ans.append('EVEN')
for i in ans:
	print(i)


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	no = [0 for i in range(n + 1)]
	for i in range(n):
		if l[i] % 2 == 0:
			no[i + 1] += no[i] + 1
		else:
			no[i + 1] = no[i]
	q = int(input())
	for i in range(q):
		(x, y) = map(int, input().split())
		if no[y] > no[x - 1]:
			print('EVEN')
		else:
			print('ODD')


def mod(n):
	return int(n) % 2

def index(n, t):
	a = []
	for x in range(n):
		if t[x] == 0:
			a.append(x + 1)
	return a
for _ in range(int(input())):
	n = int(input())
	t = list(map(mod, input().split()))
	m = index(n, t)
	for _ in range(int(input())):
		(a, b) = map(int, input().split())
		for x in m:
			if a <= x and b >= x:
				print('EVEN')
				b = 0
				break
		if b != 0:
			print('ODD')


t = int(input())
for _ in range(t):
	n = int(input())
	l = list(map(int, input().split()))
	le = []
	for i in range(n):
		if l[i] % 2 == 0:
			le.append(i)
	q = int(input())
	for _ in range(q):
		flag = 0
		(l, m) = map(int, input().split())
		for x in le:
			if x >= l - 1 and x < m:
				flag = 1
				break
		if flag == 1:
			print('EVEN')
		else:
			print('ODD')


t = int(input())
for _ in range(t):
	n = int(input())
	arr = [int(x) for x in input().split()]
	brr = []
	for i in range(len(arr)):
		if arr[i] % 2 == 0:
			brr.append(i)
	q = int(input())
	for i in range(q):
		(l, r) = map(int, input().split())
		l -= 1
		r -= 1
		flag = 0
		for term in brr:
			if term in range(l, r + 1):
				print('EVEN')
				flag = 1
				break
		if flag == 0:
			print('ODD')


(c, c2) = (1, 2)
h = 10000007
for _ in range(int(input())):
	n = int(input())
	n1 = list(map(int, input().split()))
	n2 = [0 for i in range(n + 1)]
	for i in range(n):
		if n1[i] % 2 == 0:
			n2[i + 1] += n2[i] + 1
		else:
			n2[i + 1] = n2[i]
	s = int(input())
	for i in range(s):
		(a, b) = map(int, input().split())
		if n2[b] > n2[a - 1]:
			print('EVEN')
		else:
			print('ODD')


t = int(input().strip())
for _ in range(t):
	n = int(input().strip())
	a = list(map(int, input().strip().split()))
	q = int(input().strip())
	b = [0] * n
	if a[0] & 1 == 0:
		b[0] = 1
	for i in range(1, n):
		b[i] = b[i - 1]
		if a[i] & 1 == 0:
			b[i] += 1
	for y in range(q):
		(l, r) = list(map(int, input().strip().split()))
		l -= 1
		r -= 1
		if l > 0:
			if b[r] - b[l - 1] > 0:
				print('EVEN')
			else:
				print('ODD')
		elif b[r] > 0:
			print('EVEN')
		else:
			print('ODD')


import sys
import math
import collections
import operator as op
from collections import deque
from math import gcd, inf, sqrt, pi, cos, sin, ceil, log2
from bisect import bisect_right, bisect_left
from functools import reduce
from sys import stdin, stdout, setrecursionlimit
setrecursionlimit(2 ** 20)

def factorial(n):
	if n == 0:
		return 1
	return n * factorial(n - 1)

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom

def prime_factors(n):
	i = 2
	factors = []
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.append(i)
	if n > 1:
		factors.append(n)
	return len(set(factors))

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def factors(n):
	return list(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))
MOD = 1000000007
PMOD = 998244353
T = 1
T = int(stdin.readline())
for _ in range(T):
	n = int(stdin.readline())
	a = list(map(int, stdin.readline().rstrip().split()))
	q = int(stdin.readline())
	p = [0] * (n + 1)
	for i in range(n):
		if a[i] % 2 == 0:
			p[i + 1] = 1
	for i in range(1, n + 1):
		p[i] += p[i - 1]
	while q > 0:
		(l, r) = list(map(int, stdin.readline().rstrip().split()))
		if p[r] - p[l - 1] > 0:
			print('EVEN')
		else:
			print('ODD')
		q -= 1


x = int(input())
for y in range(x):
	N = int(input())
	Z = list(map(int, input().split()))
	P = int(input())
	Z1 = [0]
	count = 0
	for q in range(N):
		if Z[q] % 2 == 0:
			count += 1
		Z1.append(count)
	for t in range(P):
		(i, j) = list(map(int, input().split()))
		if Z1[j] - Z1[i - 1] > 0:
			print('EVEN')
		else:
			print('ODD')


from collections import defaultdict as dict
from bisect import bisect_left as lower_bound
from bisect import bisect_right as upper_bound

def findFrequency(arr, n, left, right, element, store):
	a = lower_bound(store[element], left)
	b = upper_bound(store[element], right)
	return b - a
for _ in range(int(input())):
	n = int(input())
	store = dict(list)
	a = list(map(int, input().split()))
	for x in range(n):
		a[x] = a[x] % 2
	for i in range(n):
		store[a[i]].append(i)
	q = int(input())
	for x in range(q):
		(l, r) = map(int, input().split())
		l -= 1
		r -= 1
		ones = findFrequency(a, n - 1, l, r, 1, store)
		if r - l + 1 == ones:
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	t = int(input())
	arr = list(map(int, input().split()))
	prearr = [0]
	cnt = 0
	for i in range(t):
		if arr[i] % 2 == 0:
			cnt += 1
		prearr.append(cnt)
	for _ in range(int(input())):
		(l, r) = map(int, input().split())
		tot = prearr[r] - prearr[l - 1]
		print('EVEN') if tot > 0 else print('ODD')


for _ in range(int(input())):
	n = int(input())
	ls = list(map(int, input().split()))
	s = []
	for i in range(len(ls)):
		if ls[i] % 2 == 0:
			s.append(i)
	for __ in range(int(input())):
		(a, b) = map(int, input().split())
		a -= 1
		b -= 1
		f = 1
		for i in s:
			if i >= a and i <= b:
				f = 0
		if f:
			print('ODD')
		else:
			print('EVEN')


t = int(input())
ans = []
for _ in range(t):
	n = int(input())
	even = []
	num = list(map(int, input().split()))
	for i in range(n):
		if num[i] % 2 == 0:
			even.append(i)
	q = int(input())
	for i in range(q):
		flag = 0
		(l, r) = map(int, input().split())
		l = l - 1
		r = r - 1
		for j in even:
			if j >= l and j <= r:
				flag = 1
				break
		if flag == 1:
			ans.append(1)
		else:
			ans.append(0)
for i in ans:
	if i == 1:
		print('EVEN')
	else:
		print('ODD')


for _ in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	mark = [0] * (n + 1)
	count = 0
	if a[0] % 2 == 0:
		count += 1
		mark[1] = count
	for i in range(1, n):
		if a[i] % 2 == 0:
			count += 1
			mark[i + 1] = count
		else:
			mark[i + 1] = count
	for _ in range(int(input())):
		(l, r) = map(int, input().split())
		if mark[r] - mark[l - 1] > 0:
			print('EVEN')
		else:
			print('ODD')


for _ in range(int(input())):
	n = int(input())
	a = [int(i) for i in input().split()]
	even = [0 if a[0] % 2 else 0]
	for i in range(1, n):
		even.append(even[i - 1] + int(a[i] % 2 == 0))
	for q in range(int(input())):
		(l, r) = [int(i) for i in input().split()]
		if l == 1:
			if even[r - 1] > 0:
				print('EVEN')
			else:
				print('ODD')
		elif even[r - 1] - even[l - 2] > 0:
			print('EVEN')
		else:
			print('ODD')


for _ in range(int(input())):
	n = int(input())
	arr = list(map(int, input().split()))
	l = [0]
	odd = 0
	for i in range(n):
		if arr[i] % 2 != 0:
			odd += 1
			l.append(odd)
		else:
			l.append(odd)
	q = int(input())
	for i in range(q):
		(a, b) = list(map(int, input().split()))
		if l[a] == l[a - 1]:
			print('EVEN')
			continue
		if abs(l[a] - l[b]) == abs(a - b):
			print('ODD')
		else:
			print('EVEN')


import os, sys
from io import BytesIO, IOBase

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
import math
for i in range(ii()):
	n = ii()
	a = li()
	q = ii()
	l1 = [0]
	for i in range(n):
		if a[i] % 2:
			l1.append(0)
		else:
			l1.append(1)
	for i in range(2, n + 1):
		l1[i] = l1[i] + l1[i - 1]
	for i in range(q):
		(l, r) = mi()
		if l1[r] <= l1[l - 1]:
			print('ODD')
		else:
			print('EVEN')


tc = int(input())
for _ in range(tc):
	n = int(input())
	arr = list(map(int, input().split()))
	even = [0] * n
	temp = -1
	for i in range(n):
		if arr[i] % 2 == 0:
			temp = i
		even[i] = temp
	q = int(input())
	for _ in range(q):
		(l, r) = map(int, input().split())
		if even[l - 1] == even[r - 1] and arr[l - 1] % 2 != 0 and (arr[r - 1] % 2 != 0):
			print('ODD')
		else:
			print('EVEN')


for _ in range(int(input())):
	n = int(input())
	data = input()
	d = data.split()
	ans = list()
	for q in range(n):
		if int(d[q]) % 2 == 0:
			ans.append(q)
	q = int(input())
	for w in range(q):
		data = input()
		qu = data.split()
		start = int(qu[0])
		end = int(qu[1])
		flag = 1
		for e in range(len(ans)):
			if ans[e] >= start - 1 and ans[e] < end:
				print('EVEN')
				flag = 0
				break
		if flag:
			print('ODD')


for _ in range(int(input())):
	n = int(input())
	b = [0]
	a = list(map(int, input().split()))
	for i in range(n):
		if a[i] % 2 == 0:
			b.append(b[-1] + 1)
		else:
			b.append(b[-1])
	pk = sum(b)
	for i in range(int(input())):
		(l, r) = map(int, input().split())
		k = b[r] - b[l - 1]
		if k != 0:
			print('EVEN')
		else:
			print('ODD')


for t in range(int(input())):
	n = int(input())
	a = list(map(int, input().split()))
	o = [0] * n
	count = 0
	for i in range(n):
		if a[i] % 2 == 1:
			count += 1
		o[i] = count
	o = [0] + o
	for qu in range(int(input())):
		(l, r) = map(int, input().split())
		if r - l + 1 == o[r] - o[l - 1]:
			print('ODD')
		else:
			print('EVEN')