Given a string S of lowercase english characters, find out whether the summation of X and Y is even or odd, where X is the count of distinct characters which occupy even positions in english alphabets and have positive even frequency, and Y is the count of distinct characters which occupy odd positions in english alphabets and have positive odd frequency.
Note: Positive means greater than zero.
Example 1:
Input: S = "abbbcc"
Output: "ODD"
Explanation: X = 0 and Y = 1 so (X + Y) is 
ODD. 'a' occupies 1st place(odd) in english 
alphabets and its frequency is odd(1), 'b' 
occupies 2nd place(even) but its frequency 
is odd(3) so it doesn't get counted and 'c' 
occupies 3rd place(odd) but its frequency 
is even(2) so it also doesn't get counted.
Example 2:
Input: S = "nobitaa"
Output: "EVEN"
Explanation: X = 0 and Y = 2 so (X + Y) is
EVEN.
Your Task:  
You dont need to read input or print anything. Complete the function evenOdd() which takes S as input parameter and returns "EVEN"  if  X + Y is even, "ODD" otherwise.
Expected Time Complexity: O(|S|)
Expected Auxiliary Space: O(1) 
Constraints:
1 ≤ |S| ≤ 1000

Source: geeksforgeeks | Difficulty: EASY
Tags: String algorithms

Bit manipulation

Data structures

Starter code: #User function Template for python3

class Solution:

    def oddEven(ob, S):

        # code here 

Solutions:
class Solution:

	def oddEven(ob, S):
		al = {}
		for i in range(97, 123):
			al[chr(i)] = i - 96
		d = {}
		for i in S:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
		o = 0
		e = 0
		for i in d:
			if al[i] % 2:
				if d[i] % 2:
					o += 1
			elif d[i] % 2 == 0:
				e += 1
		if (o + e) % 2:
			return 'ODD'
		return 'EVEN'


class Solution:

	def oddEven(ob, S):
		freq = {}
		for i in S:
			if i not in freq:
				freq[i] = 0
			freq[i] += 1
		x = y = 0
		for i in freq:
			if ord(i) % 2 == 0 and freq[i] % 2 == 0:
				x += 1
			elif ord(i) % 2 == 1 and freq[i] % 2 == 1:
				y += 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		return 'ODD'


class Solution:

	def oddEven(ob, S):
		d = {}
		for i in S:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
		x = 0
		y = 0
		for (i, j) in d.items():
			p = 96 - ord(i)
			if p % 2 == 0 and j % 2 == 0:
				x += 1
			elif p % 2 == 1 and j % 2 == 1:
				y += 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


from collections import Counter

class Solution:

	def oddEven(ob, S):
		c = Counter(S)
		odd = 0
		even = 0
		for (item, count) in c.items():
			odd += ord(item) % 2 and count % 2
			even += ord(item) % 2 == 0 and count % 2 == 0
		return 'ODD' if (odd + even) % 2 else 'EVEN'


class Solution:

	def oddEven(ob, S):
		dic = {}
		for i in S:
			if i not in dic:
				dic[i] = 1
			else:
				dic[i] += 1
		c = 0
		for (k, v) in dic.items():
			if ord(k) % 2 and v % 2 or (ord(k) % 2 == 0 and v % 2 == 0):
				c += 1
		if c & 1 == 0:
			return 'EVEN'
		else:
			return 'ODD'


from collections import Counter

class Solution:

	def oddEven(ob, S):
		dic = {}
		x = 0
		y = 0
		for i in S:
			if i not in dic:
				dic[i] = 1
			else:
				dic[i] += 1
		for (k, v) in dic.items():
			if 65 <= ord(i) <= 122:
				if ord(k) % 2 == 0 and v % 2 == 0:
					x += 1
				if ord(k) % 2 != 0 and v % 2 != 0:
					y += 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


class Solution:

	def oddEven(ob, S):
		dic = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, 'r': 18, 's': 19, 't': 20, 'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26}
		from collections import Counter
		di = Counter(S)
		x = y = 0
		for i in di:
			if di[i] % 2 == 0 and dic[i] % 2 == 0:
				x += 1
			elif di[i] % 2 != 0 and dic[i] % 2 != 0:
				y += 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


import string

class Solution:

	def oddEven(ob, S):
		s = string.ascii_lowercase
		l = list(S)
		s1 = set(l)
		c = 1
		d1 = {}
		for i in s:
			d1[i] = c
			c += 1
		d2 = {}
		for i in S:
			if i not in d2:
				d2[i] = 1
			else:
				d2[i] += 1
		x = 0
		y = 0
		for i in s1:
			if d1[i] % 2 == 0:
				if d2[i] % 2 == 0:
					x += 1
			if d1[i] % 2 != 0:
				if d2[i] % 2 != 0:
					y += 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		return 'ODD'


class Solution:

	def oddEven(ob, s):
		x = 0
		y = 0
		d1 = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, 'r': 18, 's': 19, 't': 20, 'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26}
		d2 = {}
		for i in range(len(s)):
			try:
				d2[s[i]] += 1
			except:
				d2[s[i]] = 1
		for key in d2:
			if d1[key] % 2 == 0 and d2[key] % 2 == 0:
				x += 1
			elif d1[key] % 2 != 0 and d2[key] % 2 != 0:
				y += 1
		count = x + y
		if (x + y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


class Solution:

	def oddEven(ob, S):
		alpha = [0] * 26
		for ch in S:
			alpha[ord(ch) - ord('a')] += 1
		(x, y) = (0, 0)
		for i in range(26):
			if i % 2 == 0:
				if alpha[i] % 2 == 1:
					y += 1
			elif alpha[i] != 0 and alpha[i] % 2 == 0:
				x += 1
		return 'ODD' if (x + y) % 2 == 1 else 'EVEN'


class Solution:

	def oddEven(ob, S):
		a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
		X = 0
		Y = 0
		d = {}
		for x in S:
			if x in d:
				d[x] += 1
			else:
				d[x] = 1
		for x in set(S):
			i = a.index(x) + 1
			if i % 2 == 0 and d[x] % 2 == 0:
				X += 1
			elif i % 2 != 0 and d[x] % 2 != 0:
				Y += 1
		if (X + Y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


from collections import Counter

class Solution:

	def oddEven(ob, S):
		X = 0
		Y = 0
		mem = Counter(S)
		for ch in mem:
			if ord(ch) % 2:
				if mem[ch] % 2:
					X += 1
			elif mem[ch] % 2 == 0:
				Y += 1
		if (X + Y) % 2:
			return 'ODD'
		return 'EVEN'


from collections import Counter

class Solution:

	def oddEven(ob, S):
		c = {}
		(x, y) = (0, 0)
		c = Counter(S)
		for letter in c:
			if (ord(letter) - 96) % 2 == 0:
				if c[letter] % 2 == 0:
					x += 1
			elif (ord(letter) - 96) % 2 != 0:
				if c[letter] % 2 != 0:
					y += 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


class Solution:

	def oddEven(ob, S):
		count = [0] * 26
		(x, y) = (0, 0)
		for i in S:
			pos = ord(i) - ord('a')
			count[pos] += 1
		for i in range(26):
			if i % 2 == 0:
				if count[i] > 0 and count[i] % 2 == 1:
					x += 1
			elif count[i] > 0 and count[i] % 2 == 0:
				y += 1
		if (x + y) % 2 == 0:
			return 'EVEN'


class Solution:

	def oddEven(ob, s):
		x = 0
		y = 0
		s1 = set(s)
		for i in s1:
			freq = s.count(i)
			if (ord(i) - 96) % 2 == 0 and freq % 2 == 0:
				x += 1
			if (ord(i) - 96) % 2 == 1 and freq % 2 == 1:
				y += 1
		if (x + y) / 2 == (x + y) // 2:
			return 'EVEN'
		return 'ODD'


from collections import defaultdict

class Solution:

	def oddEven(ob, S):
		X = 0
		Y = 0
		s_dict = defaultdict(int)
		for items in S:
			s_dict[items] += 1
		for (dkey, dvalue) in s_dict.items():
			temp = ord(dkey) - 96
			value = dvalue
			if temp % 2 is 0 and value % 2 is 0:
				X += 1
			if temp % 2 is 1 and value % 2 is 1:
				Y += 1
		if (X + Y) / 2 == (X + Y) // 2:
			return 'EVEN'
		return 'ODD'


from collections import OrderedDict

class Solution:

	def oddEven(ob, S):
		od = OrderedDict()
		d = {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6, 'g': 7, 'h': 8, 'i': 9, 'j': 10, 'k': 11, 'l': 12, 'm': 13, 'n': 14, 'o': 15, 'p': 16, 'q': 17, 'r': 18, 's': 19, 't': 20, 'u': 21, 'v': 22, 'w': 23, 'x': 24, 'y': 25, 'z': 26}
		even = 0
		odd = 0
		for i in S:
			od[i] = od.get(i, 0) + 1
		for (i, j) in od.items():
			if i in d.keys():
				if d[i] % 2 == 0:
					if od[i] % 2 == 0:
						even += 1
				elif d[i] % 2 != 0:
					if od[i] % 2 != 0:
						odd += 1
		if (even + odd) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		S = input()
		ob = Solution()
		print(ob.oddEven(S))


class Solution:

	def oddEven(ob, S):
		d = {}
		c = 0
		for i in S:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
		for i in d:
			if ord(i) % 2 == 0:
				if d[i] % 2 == 0:
					c += 1
			elif ord(i) % 2 != 0:
				if d[i] % 2 != 0:
					c += 1
		if c % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		S = input()
		ob = Solution()
		print(ob.oddEven(S))


from collections import defaultdict

class Solution:

	def oddEven(ob, S):
		X = 0
		Y = 0
		d = {}
		for i in S:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
		for i in d:
			if ord(i) % 2 and d[i] % 2:
				Y += 1
			elif ord(i) % 2 == 0 and d[i] % 2 == 0:
				X += 1
		return 'ODD' if (X + Y) % 2 else 'EVEN'
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		S = input()
		ob = Solution()
		print(ob.oddEven(S))


from collections import Counter

class Solution:

	def oddEven(ob, S):
		d = Counter(S)
		s = 0
		for i in d:
			if ord(i) % 2 == 0:
				if d[i] % 2 == 0:
					s += 1
			elif ord(i) % 2 != 0:
				if d[i] % 2 != 0:
					s += 1
		if s % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		S = input()
		ob = Solution()
		print(ob.oddEven(S))


class Solution:

	def oddEven(ob, S):
		a = [0] * 26
		for i in S:
			k = ord(i) - ord('a')
			a[k] += 1
		(x, y) = (0, 0)
		for i in range(26):
			if i + 1 & 1:
				if a[i] & 1:
					y += 1
			elif not a[i] & 1 and a[i] != 0:
				x += 1
		if x + y & 1:
			return 'ODD'
		else:
			return 'EVEN'
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		S = input()
		ob = Solution()
		print(ob.oddEven(S))


from collections import Counter

class Solution:

	def oddEven(ob, S):
		c = Counter(S)
		x = 0
		y = 0
		cc = {}
		for i in S:
			if ord(i) in cc:
				cc[ord(i)] += 1
			else:
				cc[ord(i)] = 1
		for i in cc:
			if i % 2 == 0:
				if cc[i] % 2 == 0:
					x += 1
			elif cc[i] % 2 != 0:
				y += 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		S = input()
		ob = Solution()
		print(ob.oddEven(S))


from collections import Counter

class Solution:

	def oddEven(ob, s):
		(e, o) = (0, 0)
		c = Counter(s)
		for i in c:
			if ord(i) % 2 == 0 and c[i] % 2 == 0:
				e += 1
			if ord(i) % 2 == 1 and c[i] % 2 == 1:
				o += 1
		if (e + o) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		S = input()
		ob = Solution()
		print(ob.oddEven(S))


class Solution:

	def oddEven(ob, S):
		d = {}
		for i in S:
			d[i] = d.get(i, 0) + 1
		counteven = 0
		countodd = 0
		for i in d:
			if d[i] % 2 != 0 and ord(i) % 2 != 0:
				countodd += 1
			if d[i] % 2 == 0 and ord(i) % 2 == 0:
				counteven += 1
		count = countodd + counteven
		if count % 2 != 0:
			return 'ODD'
		else:
			return 'EVEN'
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		S = input()
		ob = Solution()
		print(ob.oddEven(S))


class Solution:

	def oddEven(ob, S):
		hashmap = {}
		for i in S:
			if i in hashmap:
				hashmap[i] += 1
			else:
				hashmap[i] = 1
		X = 0
		Y = 0
		S = list(S)
		for i in hashmap.keys():
			if ord(i) & 1 and hashmap[i] & 1:
				Y += 1
			if not ord(i) & 1 and (not hashmap[i] & 1):
				X += 1
		if (X + Y) % 2 != 0:
			return 'ODD'
		else:
			return 'EVEN'
if __name__ == '__main__':
	t = int(input())
	for _ in range(t):
		S = input()
		ob = Solution()
		print(ob.oddEven(S))


class Solution:

	def oddEven(ob, S):
		hashmap = {}
		for i in S:
			if i in hashmap:
				hashmap[i] += 1
			else:
				hashmap[i] = 1
		X = 0
		Y = 0
		S = list(S)
		for i in hashmap.keys():
			if ord(i) & 1 and hashmap[i] & 1:
				Y += 1
			if not ord(i) & 1 and (not hashmap[i] & 1):
				X += 1
		if (X + Y) % 2 != 0:
			return 'ODD'
		else:
			return 'EVEN'


class Solution:

	def oddEven(ob, s):
		x = 0
		y = 0
		d = {}
		for ch in s:
			if ch not in d:
				d[ch] = 1
			else:
				d[ch] += 1
		for k in d.keys():
			if ord(k) % 2 == 0 and d[k] % 2 == 0:
				x += 1
			elif ord(k) % 2 != 0 and d[k] % 2 != 0:
				y += 1
		ans = x + y
		if ans % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


class Solution:

	def oddEven(ob, S):
		x = 0
		y = 0
		st = {}
		mp1 = {}
		for i in range(0, len(S)):
			if S[i] in mp1:
				mp1[S[i]] += 1
			else:
				mp1[S[i]] = 1
		for i in range(0, len(S)):
			if S[i] not in st:
				if (ord(S[i]) - 96) % 2 == 0 and mp1[S[i]] % 2 == 0:
					st[S[i]] = 1
					x = x + 1
				elif S[i] not in st:
					if (ord(S[i]) - 96) % 2 != 0 and mp1[S[i]] % 2 != 0:
						st[S[i]] = 1
						y = y + 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


from collections import defaultdict

class Solution:

	def oddEven(ob, S):
		x = 0
		y = 0
		d = defaultdict(int)
		for i in S:
			d[ord(i)] += 1
		for i in S:
			if ord(i) % 2 == 0:
				if d[ord(i)] % 2 == 0:
					d[ord(i)] = -1
					x += 1
			elif d[ord(i)] % 2 != 0:
				d[ord(i)] = -1
				y += 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		return 'ODD'


class Solution:

	def oddEven(ob, S):
		a = list(S)
		s = set(S)
		co = 0
		for i in s:
			if ord(i) % 2 == 0:
				if a.count(i) % 2 == 0:
					co += 1
			if ord(i) % 2 != 0:
				if a.count(i) % 2 != 0:
					co += 1
		if co % 2 == 0:
			return 'EVEN'
		return 'ODD'


from collections import Counter

class Solution:

	def oddEven(ob, S):
		dic = Counter(S)
		(X, Y) = (0, 0)
		for (key, value) in dic.items():
			if ord(key) % 2 == 0 and value % 2 == 0:
				X += 1
			elif ord(key) % 2 != 0 and value % 2 != 0:
				Y += 1
		if (X + Y) % 2 == 0:
			return 'EVEN'
		return 'ODD'


class Solution:

	def oddEven(ob, S):
		k = S
		d = {}
		o = ord('a')
		for i in range(1, 27):
			d[chr(o)] = i
			o = o + 1
		s = set(S)
		x = 0
		y = 0
		for i in s:
			if k.count(i) % 2 == 0 and d[i] % 2 == 0:
				x = x + 1
			if k.count(i) % 2 != 0 and d[i] % 2 != 0:
				y = y + 1
		r = x + y
		if r % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


class Solution:

	def oddEven(ob, S):
		(x, y) = (0, 0)
		ans = [0 for i in range(26)]
		for i in S:
			ans[ord(i) - 97] += 1
		for i in range(26):
			if ans[i] > 0:
				if i & 1 and ans[i] % 2 == 0:
					x += 1
				elif i % 2 == 0 and ans[i] & 1:
					y += 1
		if x + y & 1:
			return 'ODD'
		return 'EVEN'


from collections import Counter

class Solution:

	def oddEven(ob, S):
		count = 0
		freq = Counter(S)
		alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
		x = ''
		for i in S:
			if i not in x:
				x += i
		for i in range(len(x)):
			if ((alphabet.index(x[i]) + 1) % 2 == 0) & (freq[x[i]] % 2 == 0):
				count += 1
			elif ((alphabet.index(x[i]) + 1) % 2 != 0) & (freq[x[i]] % 2 != 0):
				count += 1
		if count % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


class Solution:

	def oddEven(self, S):
		alphabets = {'even': 'bdfhjlnprtvxz', 'odd': 'acegikmoqsuwy'}
		X = 0
		Y = 0
		S_set = set(S)
		for alpha in S_set:
			if S.count(alpha) % 2 == 0 and alpha in alphabets['even']:
				X += 1
			elif S.count(alpha) % 2 == 1 and alpha in alphabets['odd']:
				Y += 1
		if (X + Y) % 2 == 0:
			return 'EVEN'
		return 'ODD'


class Solution:

	def oddEven(self, word):
		count = 0
		characterMap = 0
		for alphabet in word:
			position = ord(alphabet) - ord('a')
			count = 1 << position ^ count
			characterMap = characterMap | 1 << position
		even = odd = 0
		position = 0
		while characterMap:
			if characterMap & 1:
				if position & 1 == 0 and count >> position & 1 == 1:
					odd += 1
				if position & 1 == 1 and count >> position & 1 == 0:
					even += 1
			position += 1
			characterMap = characterMap >> 1
		if even + odd & 1:
			return 'ODD'
		return 'EVEN'


class Solution:

	def oddEven(ob, S):
		x = y = 0
		S1 = list(set(S))
		for i in S1:
			a = ord(i)
			if a % 2 == 0 and S.count(i) % 2 == 0:
				x += 1
			elif a % 2 != 0 and S.count(i) % 2 != 0:
				y += 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


from collections import OrderedDict

class Solution:

	def oddEven(ob, S):
		dic = {}
		lower = list(map(chr, range(97, 123)))
		for i in range(len(lower)):
			dic[lower[i]] = i + 1
		X = 0
		Y = 0
		freq = OrderedDict()
		for i in range(len(S)):
			if S[i] in freq:
				freq[S[i]] += 1
			else:
				freq[S[i]] = 1
		i = 1
		for (x, y) in freq.items():
			if dic[x] % 2 == 0 and y % 2 == 0:
				X += 1
				i += 1
			elif dic[x] % 2 == 1 and y % 2 == 1:
				Y += 1
				i += 1
			else:
				i += 1
		if (X + Y) % 2 == 0:
			return 'EVEN'
		return 'ODD'


class Solution:

	def oddEven(ob, S):
		X = 0
		Y = 0
		alphabets = '0abcdefghijklmnopqrstuvwxyz'
		for i in S:
			n = S.count(i)
			if n != 0 and n % 2 == 0 and (alphabets.index(i) % 2 == 0):
				X += 1
			elif n != 0 and n % 2 != 0 and (alphabets.index(i) % 2 != 0):
				Y += 1
			S = S.replace(i, '')
		if (X + Y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


class Solution:

	def oddEven(ob, string):
		alphabet = 'abcdefghijklmnopqrstuvwxyz'
		numlist = list(range(1, 27))
		alpha_dict = dict(zip(alphabet, numlist))
		res = ''
		countedChar = ''
		(X, Y) = (0, 0)
		for char in string:
			if char not in countedChar:
				countedChar = countedChar + char
				pos = alpha_dict[char]
				fre = string.count(char)
				if pos % 2 == 0 and fre % 2 == 0:
					X += 1
				if pos % 2 == 1 and fre % 2 == 1:
					Y += 1
		if (X + Y) % 2 == 0:
			res = 'EVEN'
		else:
			res = 'ODD'
		return res


from collections import Counter

class Solution:

	def oddEven(ob, s1):
		d = Counter(s1)
		s = 0
		for i in d:
			if ord(i) % 2 == 0:
				if d[i] % 2 == 0:
					s += 1
			elif ord(i) % 2 != 0:
				if d[i] % 2 != 0:
					s += 1
		if s % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


class Solution:

	def oddEven(ob, S):
		count = 0
		counted = set()
		for character in S:
			if character in counted:
				continue
			is_even_character = (ord(character) - 96) % 2 == 0
			character_count = S.count(character)
			is_even_count = character_count % 2 == 0
			if is_even_character == is_even_count:
				count += 1
			counted.add(character)
		result = 'EVEN' if count % 2 == 0 else 'ODD'
		return result


class Solution:

	def oddEven(ob, S):
		m = {}
		x = 0
		y = 0
		for i in S:
			if i in m:
				m[i] = m[i] + 1
			else:
				m[i] = 1
		for i in m:
			if m[i] % 2 == 0 and ord(i) % 2 == 0:
				x = x + 1
			if m[i] % 2 == 1 and ord(i) % 2 == 1:
				y = y + 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		return 'ODD'


class Solution:

	def oddEven(ob, S):
		count = {}
		final = 0
		for i in S:
			if i in count:
				count[i] += 1
			else:
				count[i] = 1
		for j in list(count.keys()):
			if ord(j) % 2 == 0 and count[j] % 2 == 0 or (ord(j) % 2 != 0 and count[j] % 2 != 0):
				final += 1
		return 'EVEN' if final % 2 == 0 else 'ODD'


class Solution:

	def oddEven(ob, S):
		d = {}
		X = 0
		Y = 0
		for i in range(len(S)):
			d[ord(S[i])] = d.get(ord(S[i]), 0) + 1
		for key in d:
			if key % 2 != 0 and d[key] % 2 != 0:
				X = X + 1
			elif key % 2 == 0 and d[key] % 2 == 0:
				Y = Y + 1
		if (X + Y) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


class Solution:

	def oddEven(ob, S):
		visited = [0] * 27
		d = {}
		X = 0
		Y = 0
		for i in S:
			if i not in d:
				d[i] = 1
			else:
				d[i] += 1
		for (i, j) in d.items():
			if (ord(i) - 97 + 1) % 2 == 1 and d[i] % 2 == 1:
				Y += 1
			elif (ord(i) - 97 + 1) % 2 == 0 and d[i] % 2 == 0:
				X += 1
		if (X + Y) % 2 == 1:
			return 'ODD'
		return 'EVEN'


class Solution:

	def oddEven(ob, S):
		x = 0
		y = 0
		a = {}
		for i in S:
			if i in a:
				a[i] = a[i] + 1
			else:
				a[i] = 1
		for j in a:
			if ord(j) % 2 == 0 and a[j] % 2 == 0:
				y = y + 1
			elif ord(j) % 2 != 0 and a[j] % 2 != 0:
				x = x + 1
		if (x + y) % 2 == 0:
			return 'EVEN'
		return 'ODD'


class Solution:

	def oddEven(ob, S):
		ans = [0] * 125
		for i in range(len(S)):
			ans[ord(S[i])] += 1
		e = 0
		o = 0
		for i in range(97, 125):
			if ans[i] > 0 and ans[i] % 2 == 0 and (i % 2 == 0):
				e += 1
			if ans[i] > 0 and ans[i] % 2 != 0 and (i % 2 != 0):
				o += 1
		res = e + o
		if res % 2 == 0:
			return 'EVEN'
		return 'ODD'


class Solution:

	def oddEven(ob, S):
		(odd, even) = (0, 0)
		alrd = []
		arr = [chr(i) for i in range(ord('a'), ord('z') + 1)]
		for i in S:
			if i not in alrd:
				if (arr.index(i) + 1) % 2 == 0:
					alrd.append(i)
					if S.count(i) % 2 == 0:
						even += 1
				else:
					alrd.append(i)
					if S.count(i) % 2 != 0:
						odd += 1
		if (odd + even) % 2 == 0:
			return 'EVEN'
		else:
			return 'ODD'


from collections import Counter

class Solution:

	def oddEven(ob, S):
		d = Counter(S)
		odd = 'acegikmoqsuwy'
		even = 'bdfhjlnprtvxz'
		X = 0
		Y = 0
		for k in d.keys():
			if k in even and d[k] % 2 == 0:
				X += 1
			elif k in odd and d[k] % 2 != 0:
				Y += 1
		ans = 'ODD' if (X + Y) % 2 != 0 else 'EVEN'
		return ans


class Solution:

	def oddEven(ob, S):
		a = [0 for i in range(26)]
		for i in range(len(S)):
			k = ord(S[i]) - 97
			a[k] = a[k] + 1
		x = 0
		for i in range(1, 27):
			if a[i - 1] != 0:
				if i % 2 != 0 and a[i - 1] % 2 != 0 or (i % 2 == 0 and a[i - 1] % 2 == 0):
					x = x + 1
		if x % 2 == 0:
			return 'EVEN'
		return 'ODD'


class Solution:

	def oddEven(ob, S):
		d = {}
		count = 0
		for i in S:
			if ord(i) - 96 in d:
				d[ord(i) - 96] += 1
			else:
				d[ord(i) - 96] = 1
		for i in d:
			if d[i] % 2 == 0 and i % 2 == 0:
				count += 1
			elif (d[i] + 1) % 2 == 0 and (i + 1) % 2 == 0:
				count += 1
		return 'EVEN' if count % 2 == 0 else 'ODD'


from collections import Counter

class Solution:

	def oddEven(ob, S):
		count = Counter(S)
		X = 0
		Y = 0
		for (k, v) in count.items():
			if (ord(k) - 96) % 2 == 0:
				if v % 2 == 0:
					X += 1
			elif v % 2 != 0:
				Y += 1
		return 'ODD' if (X + Y) % 2 != 0 else 'EVEN'