import std.algorithm, std.conv, std.range, std.stdio, std.string; import std.bitmanip; // BitArray void main() { auto n = readln.chomp.to!size_t; auto a = new int[](n), rda = readln.chomp.splitter; foreach (i; 0..n) { a[i] = rda.front.to!int; rda.popFront(); } auto b = new int[](n), rdb = readln.chomp.splitter; foreach (i; 0..n) { b[i] = rdb.front.to!int; rdb.popFront(); } auto newBitArray() { auto r = BitArray(); r.length = 2*n-1; return r; } auto shift(ref BitArray ba, size_t n) { if (n > 0 && n % 64 == 0) { ba <<= 1; ba <<= n-1; } else { ba <<= n; } } size_t[][int] c; foreach (i, ai; a) c[ai] ~= i; auto r = newBitArray(); foreach (ci; c.byValue) { auto d = newBitArray(); foreach (cii; ci) d[cii] = true; auto s = newBitArray(), p = size_t(0); foreach (i, bi; b) { if (bi) { shift(d, i - p); s |= d; p = i; } } r ^= s; } foreach (i; 0..2*n-1) writeln(r[i] ? "ODD" : "EVEN"); }