We need to read T test cases, each test case is a number N (as a string, because up to 10^100, which is huge, cannot fit in typical integer types). We need to reverse the number (as a decimal string, but careful about leading zeros? The number N is given without leading zeros probably, as it's a number. The reverse of a number typically means reverse the digits and treat as a number, but we only need to know whether that reversed number is even or odd. That depends solely on the last digit (least significant digit) of the reversed number. The last digit of the reversed number is the first digit of the original number. So basically we need to check if the first digit of N (the most significant digit) is even or odd. But is it that simple? Let's test: N = 15, reverse = 51, last digit is 1, so odd. First digit of N is 1 (odd). Works. N = 6, reverse = 6, first digit 6 (even) => even. N = 10? Input N = 10 (but N is within constraints, no leading zeros). Reverse would be 01? Typically the reverse of a number is the number formed by reversing its decimal digits, ignoring leading zeros. So reverse of 10 is 1? Actually reverse digits: 10 -> "10" reversed to "01" => as a number that's 1. So the reverse number is 1, which is odd. The first digit of N is 1 (odd). But is the reverse considered as a number? Usually reverse of a number means you reverse the digit sequence, and then interpret it as a number, which automatically drops leading zeros. So the last digit of the reversed number is the first digit of the original number (unless the original number ends with zeros? Actually careful: Reverse digits: original digits d_k ... d_1 d_0 (with d_0 being least significant). Reverse yields d_0 d_1 ... d_k. But when we interpret that as a number, any leading zeros (i.e., d_0 = 0) would be dropped. So the last digit of the reversed number (least significant) corresponds to the first digit of the original number (d_k) only if d_0 is not zero? Wait, let's think: original number N represented as a string of digits without leading zeros: s = s[0] s[1] ... s[L-1] where s[0] is the most significant digit (non-zero). The reverse string is s_rev = s[L-1] ... s[0]. Then we interpret that as a number. The last digit of that number (the least significant digit) is the last character of s_rev, which is s[0] (the most significant digit of original). That is true regardless of whether s_rev has leading zeros? The last digit of s_rev is s[0] and that is the least significant digit of the number (provided we don't drop it due to being zero? But trailing zeros don't get dropped; only leading zeros are removed when interpreting as a number. The last digit of the string (rightmost) corresponds to the least significant digit of the number. So indeed the parity of the reversed number is determined by s[0]. However, what if the reversed string has leading zeros? That doesn't affect the last digit. Example: N=10, s="10", s_rev="01", as a number it is 1. The last digit of s_rev is '1', which is s[0]=1. So parity odd. So works. N=100, s_rev="001" => number is 1, last digit of reversed string is '1' (s[0]=1). Works. N=200, s_rev="002" => number is 2, even. So indeed the parity of reversed number is simply the parity of the most significant digit of original number. But wait: what about numbers like 0? However constraints: 1 ≤ N, so N>=1. So first digit cannot be zero.
Thus, answer: For each test case, read the string N, look at its first character (index 0). If that digit is even (0,2,4,6,8) then print "EVEN", else "ODD". Since N>=1, first digit cannot be '0', but even digits include 0, but 0 won't appear as first digit. So we can just check if the digit is even.
But note: The number can be huge (up to 10^100). So reading as string is necessary. So solution is trivial.
Check sample: 1 -> first digit 1 -> odd -> ODD. 3 -> ODD. 6 -> even -> EVEN. 15 -> first digit 1 -> ODD. Matches sample.
Thus, implement: read integer T, loop T times, read string s, if s[0] in {'0','2','4','6','8'}? Actually s[0] is char, convert to int: digit = s[0] - '0', then if digit % 2 == 0: print "EVEN", else "ODD". Or simpler: if s[0] in '02468' then EVEN else ODD.
Edge cases: input might contain leading/trailing whitespaces; using standard input reading we can trim. Also maybe multiple test cases are given on separate lines. T up to 10000, so it's fine.
Implementation in C++ or whatever language. The problem statement is generic. We'll provide Python solution maybe.
But note: The problem title might require "efficient method", and our method is O(1) per test case, which is efficient.
Thus, answer is straightforward.
But wait, there is nuance: "reverse of a number" typically for numbers might consider reversing the digits and then interpreting as a number. However, sometimes they consider the reverse of 1200 as 0021 -> 21? Actually reverse digits of 1200: digits 1,2,0,0 reversed to 0,0,2,1 -> as a number that's 21 (since leading zeros dropped). So parity is determined by last digit of reversed number, which is the first digit (1) -> odd. So correct.
Thus, final solution: For each N as string, check if first character is even -> print EVEN else ODD.
We'll write code accordingly.
But the problem statement says "Confused, Simply print "EVEN"(without quotes) if the reverse of the given number is even and print "ODD"(without quotes) if the reverse of the given number is odd." So we must output exactly EVEN or ODD.
We'll produce answer with explanation.
Now, we need to ensure that we handle input correctly; there might be blank lines. But usually not.
Thus, final code in Python:
def solve():
import sys
data = sys.stdin.read().strip().split()
if not data:
return
T = int(data[0])
out = []
for i in range(1, T+1):
s = data[i].strip()
# ensure s is not empty
if s[0] in '02468':
out.append("EVEN")
else:
out.append("ODD")
sys.stdout.write("\n".join(out))
Alternatively, could use input() in loop.
But reading all at once is faster for large T.
Now, note: The input may contain numbers with leading zeros? It says "1 ≤ N ≤ 10^100". Typically N is a positive integer without leading zeros. So first char is not zero.
Thus, solution is done.
But hold on: The problem statement: "reverse of a number and say it as a EVEN or ODD." Could they possibly define reverse as "reverse the number" meaning something else? Possibly they consider reverse as the number obtained by reversing the digits, but the parity check is on that reversed number. So yes.
Thus, final answer is this.
But to be thorough, we can also consider if the number is extremely large and we need to output quickly; our method is O(1) per test.
Thus, solution is correct.
Now, write final answer with explanation and code. We only need to check the parity of the reversed number. The reversed number is obtained by writing the digits of the original number in reverse order. The last digit (units place) of this reversed number determines whether it is even or odd. That last digit is exactly the first (most significant) digit of the original number. Therefore, the answer is simply "EVEN" if the first digit of the given number is even, otherwise "ODD".
Since the number can be up to (10^{100}) (far beyond standard integer limits), we read it as a string.
Time Complexity: (O(T)) – constant per test case.
Space Complexity: (O(1)) extra space per test case.
import sys
def solve() -> None:
data = sys.stdin.read().strip().split()
if not data:
return
t = int(data[0])
out_lines = []
for i in range(1, t + 1):
num_str = data[i].strip()
# First digit determines parity of the reversed number
if num_str[0] in '02468':
out_lines.append('EVEN')
else:
out_lines.append('ODD')
sys.stdout.write('\n'.join(out_lines))
if __name__ == "__main__":
solve()