#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; } template void shiftOp(uint64_t *x, const uint64_t *y, int N, int shift, Op op) { if(N <= 0) return; x += shift / 64; shift %= 64; if(shift == 0) { for(int i = 0; i < N; ++ i) x[i] = op(x[i], y[i]); } else { x[0] = op(x[0], y[0] << shift); for(int i = 0; i < N - 1; ++ i) x[i + 1] = op(x[i + 1], op(y[i + 1] << shift, y[i] >> (64 - shift))); x[N] = op(x[N], y[N - 1] >> (64 - shift)); } } void shiftOr(uint64_t *x, const uint64_t *y, int N, int shift) { shiftOp(x, y, N, shift, bit_or()); } void shiftXor(uint64_t *x, const uint64_t *y, int N, int shift) { shiftOp(x, y, N, shift, bit_xor()); } template void verticalAddition(array &x, uint64_t y) { uint64_t c = y; for(int i = 0; i < LogH - 1; ++ i) { uint64_t t = x[i] & c; x[i] ^= c; c = t; } x[LogH - 1] ^= c; } int main() { int N; while(~scanf("%d", &N)) { vector a(N); for(int i = 0; i < N; ++ i) scanf("%d", &a[i]); vector b(N); for(int i = 0; i < N; ++ i) scanf("%d", &b[i]); const int H = 64, LogH = 6; const int X = (N - 1) / 64 + 1; vector B(X * 2 + 2); rep(i, N) if(b[i] == 1) B[i / 64] |= 1ULL << (i % 64); vector values = a; sort(values.begin(), values.end()); values.erase(unique(values.begin(), values.end()), values.end()); int V = (int)values.size(); vector shifts(V); rep(i, N) { int k = (int)(lower_bound(values.begin(), values.end(), a[i]) - values.begin()); shifts[k].push_back(i); } vector row(X * 2 + 2); vector> sums(X * 2 + 2); vector ans(X * 2 * 64, 0); for(int i = 0; i < V; ) { memset(sums.data(), 0, sizeof(uint64_t) * LogH * (X * 2)); for(int y = 0; y < H && i < V; ++ y, ++ i) { memset(row.data(), 0, sizeof(uint64_t) * (X * 2)); for(int shift : shifts[i]) shiftOr(row.data(), B.data(), X, shift); rep(j, X * 2) verticalAddition(sums[j], row[j]); } rep(j, X * 2) { rep(k, LogH) { uint64_t t = sums[j][k]; rep(x, 64) { ans[j * 64 + x] += (int)((t & 1) << k); t >>= 1; } } } } rep(i, N * 2 - 1) puts(ans[i] % 2 ? "ODD" : "EVEN"); } return 0; }