#include <algorithm>
#include <iostream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <bitset>
#include <complex>
#include <unistd.h>
#include <cassert>
#include <cctype>
#include <random>
#define _USE_MATH_DEFINES
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;
typedef complex<double> xy_t;
#define REP(i, x, y) for(ll i = x; i < y; i++)
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
double pi = 3.141592653589793;
ll mod = 1000000007;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;
int iinf = intmax / 8;
ll inf = llmax / 8;
double eps = 1e-11;

plglg usa[1000010];
plglg neko[1000010];

ll usatate[510], usayoko[510], nekotate[510], nekoyoko[510];
ll usadiaga = 0, usadiagb = 0, nekodiaga = 0, nekodiagb = 0;

int main() {
    ll n, u, v, m;
    cin >> n >> u >> v >> m;
    fill(usa, usa + 1000010, plglg(-1, -1));
    fill(neko, neko + 1000010, plglg(-1, -1));
    REP(i, 0, n) {
        REP(j, 0, n) {
            ll p;
            cin >> p;
            usa[p] = plglg(i, j);
        }
    }
    REP(i, 0, n) {
        REP(j, 0, n) {
            ll p;
            cin >> p;
            neko[p] = plglg(i, j);
        }
    }
    ll num[m];
    REP(i, 0, m) {
        cin >> num[i];
    }
    fill(usatate, usatate + 510, 0);
    fill(usayoko, usayoko + 510, 0);
    fill(nekotate, nekotate + 510, 0);
    fill(nekoyoko, nekoyoko + 510, 0);
    ll usanum = 0;
    ll nekonum = 0;
    REP(i, 0, m) {
        plglg usapos = usa[num[i]];
        if (usapos.first != -1) {
            usatate[usapos.first]++;
            if (usatate[usapos.first] == n) {
                usanum++;
            }
            if (n >= 2) {
                usayoko[usapos.second]++;
                if (usayoko[usapos.second] == n) {
                    usanum++;
                }
                if (usapos.first == usapos.second) {
                    usadiaga++;
                    if (usadiaga == n) {
                        usanum++;
                    }
                }
                if (usapos.first == n - 1 - usapos.second) {
                    usadiagb++;
                    if (usadiagb == n) {
                        usanum++;
                    }
                }
            }
        }
        plglg nekopos = neko[num[i]];
        if (nekopos.first != -1) {
            nekotate[nekopos.first]++;
            if (nekotate[nekopos.first] == n) {
                nekonum++;
            }
            if (n >= 2) {
                nekoyoko[nekopos.second]++;
                if (nekoyoko[nekopos.second] == n) {
                    nekonum++;
                }
                if (nekopos.first == nekopos.second) {
                    nekodiaga++;
                    if (nekodiaga == n) {
                        nekonum++;
                    }
                }
                if (nekopos.first == n - 1 - nekopos.second) {
                    nekodiagb++;
                    if (nekodiagb == n) {
                        nekonum++;
                    }
                }
            }
        }
        // REP(i, 0, n) {
        //     cout << usatate[i] << " " << usayoko[i] << " " << nekotate[i] << " " << nekoyoko[i] << endl;
        // }
        // cout << num[i] << " " << usadiaga << " " << usadiagb << " " << nekodiaga << " " << nekodiagb << endl;
        // cout << "aaa" << endl;
        if (usanum >= u && nekonum < v) {
            cout << "USAGI" << endl;
            return 0;
        } else if (usanum < u && nekonum >= v) {
            cout << "NEKO" << endl;
            return 0;
        } else if (usanum >= u && nekonum >= v) {
            cout << "DRAW" << endl;
            return 0;
        }
    }
    cout << "DRAW" << endl;
}



Measured memory_bytes: 34644