#include "bits/stdc++.h" using namespace std; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i)) #define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL; typedef vector vi; typedef pair pii; typedef vector > vpii; typedef long long ll; template static void amin(T &x, U y) { if(y < x) x = y; } template static void amax(T &x, U y) { if(x < y) x = y; } #ifdef NDEBUG #error assert is disabled! #endif template T readNatural(T lo, T up) { assert(0 <= lo && lo <= up); T x = 0; while(1) { int d = getchar(); if(!('0' <= d && d <= '9')) { ungetc(d, stdin); break; } d -= '0'; assert(d <= up && x <= (up - d) / 10); x = x * 10 + d; } assert(lo <= x && x <= up); return x; } void readSpace() { int c = getchar(); assert(c == ' '); } static bool read_eof = false; void readEOL() { int c = getchar(); if(c == EOF) { assert(!read_eof); read_eof = true; } else { assert(c == '\n'); } } void readEOF() { assert(!read_eof); int c = getchar(); assert(c == EOF); read_eof = true; } unsigned xor128() { static unsigned x = 123456789, y = 362436069, z = 521288629, w = 88675123; unsigned t = x ^ (x << 11); x = y; y = z; z = w; return w = w ^ (w >> 19) ^ (t ^ (t >> 8)); } int main() { int N = readNatural(1, 100000); readEOL(); vector a(N); rep(i, N) { a[i] = readNatural(1, 100000); if(i != N - 1) readSpace(); else readEOL(); } vector b(N); rep(i, N) { b[i] = readNatural(0, 1); if(i != N - 1) readSpace(); else readEOL(); } readEOF(); typedef bitset<200000> Bitset; Bitset B; rep(i, N) if(b[i] == 1) B.set(i); vector> ais(N); rep(i, N) ais[i] = make_pair(a[i], i); sort(ais.begin(), ais.end()); Bitset C; for(int i = 0; i < N; ) { int j = i; Bitset A; for(; j < N && ais[j].first == ais[i].first; ++ j) { int shift = ais[j].second; A |= B << shift; } C ^= A; i = j; } rep(i, N * 2 - 1) puts(C[i] ? "ODD" : "EVEN"); return 0; }