#include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for (int i = 0; i < (n); i++)
#define int long long
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define all(x) x.begin(), x.end()
using pii = pair<int, int>;

int A[505][505], B[505][505];
int rax[505], ray[505], rbx[505], rby[505];
void solve() {
    int N, U, V, M;
    cin >> N >> U >> V >> M;
    map<int, pii> mpA, mpB;
    int ra1 = N, ra2 = N, rb1 = N, rb2 = N;
    REP(i, N) { rax[i] = ray[i] = rbx[i] = rby[i] = N; }
    REP(i, N) {
        REP(j, N) {
            cin >> A[i][j];
            mpA[A[i][j]] = {i, j};
        }
    }
    REP(i, N) REP(j, N) {
        cin >> B[i][j];
        mpB[B[i][j]] = {i, j};
    }
    bool done = false;
    int result = 0;
    int cntA = 0, cntB = 0;
    if (N == 1) {
        REP(i, M) {
            int x;
            cin >> x;
            if (done) continue;
            if (mpA.count(x)) {
                pii p = mpA[x];
                // cerr << "A:" << p.first << " " << p.second << endl;
                rax[p.first]--;
                ray[p.second]--;
                if (p.first == p.second)
                    ra1--;
                else if (p.first == N - p.second - 1)
                    ra2--;
                if (ra1 == 0) {
                    // cerr << "ra1" << endl;
                    ra1--;
                    cntA++;
                }
                if (ra2 == 0) {
                    // cerr << "ra2" << endl;
                    ra2--;
                    cntA++;
                }
                if (rax[p.first] == 0) cntA++;
                if (ray[p.second] == 0) cntA++;
            }
            if (mpB.count(x)) {
                pii p = mpB[x];
                // cerr << "B:" << p.first << " " << p.second << endl;
                rbx[p.first]--;
                rby[p.second]--;
                if (p.first == p.second)
                    rb1--;
                else if (p.first == N - p.second - 1)
                    rb2--;
                if (rb1 == 0) {
                    rb1--;
                    cntB++;
                }
                if (rb2 == 0) {
                    rb2--;
                    cntB++;
                }
                if (rbx[p.first] == 0) cntB++;
                if (rby[p.second] == 0) cntB++;
            }

            // cerr << "cntA:" << cntA << endl;
            // cerr << "cntB:" << cntB << endl;
            if (cntA) cntA = 1;
            if (cntB) cntB = 1;
            if (cntA >= U && cntB >= V) {
                done = true;
            } else if (cntA >= U) {
                done = true;
                result = 1;
            } else if (cntB >= V) {
                done = true;
                result = 2;
            }
        }
        if (result == 0)
            cout << "DRAW";
        else if (result == 1)
            cout << "USAGI";
        else
            cout << "NEKO";
        cout << endl;
    } else {
        REP(i, M) {
            int x;
            cin >> x;
            if (done) continue;
            if (mpA.count(x)) {
                pii p = mpA[x];
                // cerr << "A:" << p.first << " " << p.second << endl;
                rax[p.first]--;
                ray[p.second]--;
                if (p.first == p.second) ra1--;
                if (p.first == N - p.second - 1) ra2--;
                if (ra1 == 0) {
                    // cerr << "ra1" << endl;
                    ra1--;
                    cntA++;
                }
                if (ra2 == 0) {
                    // cerr << "ra2" << endl;
                    ra2--;
                    cntA++;
                }
                if (rax[p.first] == 0) cntA++;
                if (ray[p.second] == 0) cntA++;
            }
            if (mpB.count(x)) {
                pii p = mpB[x];
                // cerr << "B:" << p.first << " " << p.second << endl;
                rbx[p.first]--;
                rby[p.second]--;
                if (p.first == p.second) rb1--;
                if (p.first == N - p.second - 1) rb2--;
                if (rb1 == 0) {
                    rb1--;
                    cntB++;
                }
                if (rb2 == 0) {
                    rb2--;
                    cntB++;
                }
                if (rbx[p.first] == 0) cntB++;
                if (rby[p.second] == 0) cntB++;
            }

            // cerr << "cntA:" << cntA << endl;
            // cerr << "cntB:" << cntB << endl;
            // if (cntA >= U || cntB >= V) {
            //     cerr << "cntA:" << cntA << endl;
            //     cerr << "cntB:" << cntB << endl;
            // }
            if (cntA >= U && cntB >= V) {
                done = true;
            } else if (cntA >= U) {
                done = true;
                result = 1;
            } else if (cntB >= V) {
                done = true;
                result = 2;
            }
        }
        if (result == 0)
            cout << "DRAW";
        else if (result == 1)
            cout << "USAGI";
        else
            cout << "NEKO";
        cout << endl;
    }
}

signed main() {
    // while (solve())
    solve();
}


Measured memory_bytes: 24060