#include "bits/stdc++.h"

using namespace std;

using i64 = long long;

const i64 MOD = i64(1e9) + 7;
const i64 INF = i64(1e18) + 7;


signed main(){
    int n, u, v, m;
    cin >> n >> u >> v >> m;
    vector<vector<int>> usagi(n, vector<int>(n, 0));
    vector<vector<int>> neko(n, vector<int>(n, 0));
    map<int,pair<int,int>> usagi_set, neko_set;
    for(int i = 0; i < n; ++i)
        for(int j = 0; j < n; ++j){
            cin >> usagi[i][j];
            usagi_set[usagi[i][j]] = make_pair(i, j);
        }
    for(int i = 0; i < n; ++i)
        for(int j = 0; j < n; ++j){
            cin >> neko[i][j];
            neko_set[neko[i][j]] = make_pair(i, j);
        }

    vector<int> a(m);
    for(int i = 0; i < m; ++i)
        cin >> a[i];

    unordered_map<int,int> usagi_h, usagi_w, usagi_hw, usagi_wh;
    unordered_map<int,int> neko_h, neko_w, neko_hw, neko_wh;

    int usagi_cnt = 0, neko_cnt = 0;
    for(auto& b : a){
        if(usagi_set.find(b) != usagi_set.end()){
            int x, y;
            tie(x, y) = usagi_set[b];
            ++usagi_h[x];
            ++usagi_w[y];
            ++usagi_hw[x + y];
            ++usagi_wh[x - y];
            usagi_cnt += (usagi_h[x] == n);
            usagi_cnt += (usagi_w[y] == n);
            usagi_cnt += (usagi_hw[x + y] == n);
            usagi_cnt += (usagi_wh[x - y] == n);
            if(n == 1){
                usagi_cnt = 1;
            }
        }
        if(neko_set.find(b) != neko_set.end()){
            int x, y;
            tie(x, y) = neko_set[b];
            ++neko_h[x];
            ++neko_w[y];
            ++neko_hw[x + y];
            ++neko_wh[x - y];
            neko_cnt += (neko_h[x] == n);
            neko_cnt += (neko_w[y] == n);
            neko_cnt += (neko_hw[x + y] == n);
            neko_cnt += (neko_wh[x - y] == n);
            if(n == 1){
                neko_cnt = 1;
            }
        }
        if(usagi_cnt >= u && neko_cnt >= v){
            cout << "DRAW" << endl;
            return 0;
        }
        if(usagi_cnt >= u && neko_cnt < v){
            cout << "USAGI" << endl;
            return 0;
        }
        if(usagi_cnt < u && neko_cnt >= v){
            cout << "NEKO" << endl;
            return 0;
        }
    }
    cout << "DRAW" << endl;
    return 0;
}


