#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
using namespace std;
#define INF 100000000
#define MAXM 1000001
#define MAXN 512
typedef pair<int, int> P;
typedef long long ll;
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};

int n, u, v, m;

vector<P> usagi[MAXM];
vector<P> neko[MAXM];
int usabingo_tate[MAXN];
int usabingo_yoko[MAXN];
int usabingo_naname[2];
int nekobingo_tate[MAXN];
int nekobingo_yoko[MAXN];
int nekobingo_naname[2];
int usabingo = 0;
int nekobingo = 0;

int main(void) {
    cin >> n >> u >> v >> m;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            int c;
            cin >> c;
            usagi[c].push_back(make_pair(i, j));
        }
    }
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            int c;
            cin >> c;
            neko[c].push_back(make_pair(i, j));
        }
    }
    for (int i = 0; i < m; i++) {
        int num;
        cin >> num;
        // usagi
        for (int j = 0; j < usagi[num].size(); j++) {
            int y = usagi[num][j].first;
            int x = usagi[num][j].second;
            if (x == y) {
                if (++usabingo_naname[0] == n) {
                    usabingo++;
                    if (n == 1) usabingo = min(usabingo , n);
                }
            }
            if ((n-1) - x == y) {
                if (++usabingo_naname[1] == n) {
                    usabingo++;
                    if (n == 1) usabingo = min(usabingo , n);
                }
            }
            if (++usabingo_tate[x] == n) {
                    usabingo++;
                    if (n == 1) usabingo = max(usabingo , n);
            }
            if (++usabingo_yoko[y] == n) {
                    usabingo++;
                    if (n == 1) usabingo = min(usabingo , n);
            }
        }
        // neko
        for (int j = 0; j < neko[num].size(); j++) {
            int y = neko[num][j].first;
            int x = neko[num][j].second;
            if (x == y) {
                if (++nekobingo_naname[0] == n) {
                    nekobingo++;
                    if (n == 1) nekobingo = min(nekobingo , n);
                }
            }
            if ((n-1) - x == y) {
                if (++nekobingo_naname[1] == n) {
                    nekobingo++;
                    if (n == 1) nekobingo = min(nekobingo , n);
                }
            }
            if (++nekobingo_tate[x] == n) {
                    nekobingo++;
                    if (n == 1) nekobingo = min(nekobingo , n);
            }
            if (++nekobingo_yoko[y] == n) {
                    nekobingo++;
                    if (n == 1) nekobingo = min(nekobingo , n);
            }
        }
//        cout << "usabingo " << usabingo << endl;
//        cout << "nekobingo " << nekobingo << endl;
        if (usabingo >= u && nekobingo < v) {
            cout << "USAGI" << endl;
            return 0;
        } else if (usabingo < u && nekobingo >= v) {
            cout << "NEKO" << endl;
            return 0;
        } else if (usabingo >= u && nekobingo >= v) {
            cout << "DRAW" << endl;
            return 0;
        }
    }
    cout << "DRAW" << endl;
    return 0;
}

Measured memory_bytes: 57052