#include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; using ull = unsigned long long; using uint = unsigned int; const int MN = 200128; using B = array; const size_t BS = MN/64; void orassign(B &l, B r) { for (int i = 0; i < BS; i++) { l[i] |= r[i]; } } void xorassign(B &l, B r) { for (int i = 0; i < BS; i++) { l[i] ^= r[i]; } } B shiftL(const B &x, int k) { // << B ans; ans.fill(0); int shift = k%64; if (shift) { ans[k/64] |= x[0]<>(64-shift); ans[i+k/64] |= x[i]< g[MD]; int n; scanf("%d", &n); for (int i = 0; i < n; i++) { int a; scanf("%d", &a); g[a].push_back(i); } B mp; mp.fill(0); for (int i = 0; i < n; i++) { int x; scanf("%d", &x); if (x) { mp[i/64] |= 1ULL<<(i%64); } } B ans; ans.fill(0); constexpr int BU = 31; for (int fe = 0; fe < MD/BU; fe++) { B res[BU]; for (int i = 0; i < BU; i++) { res[i].fill(0); for (int d: g[fe*BU+i]) { orassign(res[i], shiftL(mp, d)); } } for (int i = 0; i < BU; i++) { xorassign(ans, res[i]); } } for (int i = 0; i < 2*n-1; i++) { if (ans[i/64] & (1ULL<<(i%64))) { printf("ODD\n"); } else { printf("EVEN\n"); } } return 0; }