//#define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define int ll
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define IN(a, b, x) (a<=x&&x<b)
#define MP make_pair
#define PB push_back
#ifdef int
const ll INF = (1LL<<60);
#else
const int INF = (1LL<<30);
#endif
const double PI = 3.14159265359;
const double EPS = 1e-12;
const int MOD = 1000000007;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }

int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0};

PII mp1[1000010], mp2[1000010];
int cnt1[1010], cnt2[1010];
signed main(void)
{
  int n, u, v, m;
  cin >> n >> u >> v >> m;
  REP(i, 1000010) mp1[i] = mp2[i] = {-1LL, -1LL};
  REP(i, n) REP(j, n) {
    int x;
    cin >> x;
    mp1[x] = {i, j};
  }
  REP(i, n) REP(j, n) {
    int x;
    cin >> x;
    mp2[x] = {i, j};
  }

  if(n == 1) {
    int ret1 = 0, ret2 = 0, res = -1;
    REP(i, m) {
      int a;
      cin >> a;
      if(res != -1) continue;
      // cout << mp1[a].first << " " << mp1[a].second << " " << mp2[a].first << " " << mp2[a].second << endl;
      if(mp1[a] != MP(-1LL, -1LL)) ret1 = 1;
      if(mp2[a] != MP(-1LL, -1LL)) ret2 = 1;
      // cout << ret1 << " " << ret2 << endl;
      if(ret1 >= u && ret2 >= v) res = 0;
      else if(ret1 >= u) res = 1;
      else if(ret2 >= v) res = 2;
    }
    if(res == 1) cout << "USAGI" << endl;
    else if(res == 2) cout << "NEKO" << endl;
    else cout << "DRAW" << endl;
    return 0;
  }

  /*
  0???n-1:???, n???2*n-1:?¨?, 2*n:?????????????????? 2*n+1:??????????????????
  */
  int ret1 = 0, ret2 = 0, res = -1;
  REP(i, m) {
    int a;
    cin >> a;
    if(res != -1) continue;
    if(mp1[a] != MP(-1LL, -1LL)) {
      cnt1[mp1[a].first]++;
      if(cnt1[mp1[a].first] == n) ret1++;
      cnt1[mp1[a].second+n]++;
      if(cnt1[mp1[a].second+n] == n) ret1++;
      if(mp1[a].first == n-1-mp1[a].second) {
        cnt1[2*n]++;
        if(cnt1[2*n] == n) ret1++;
      }
      if(mp1[a].first == mp1[a].second) {
        cnt1[2*n+1]++;
        if(cnt1[2*n+1] == n) ret1++;
      }
    }
    if(mp2[a] != MP(-1LL, -1LL)) {
      cnt2[mp2[a].first]++;
      if(cnt2[mp2[a].first] == n) ret2++;
      cnt2[mp2[a].second+n]++;
      if(cnt2[mp2[a].second+n] == n) ret2++;
      if(mp2[a].first == n-1-mp2[a].second) {
        cnt2[2*n]++;
        if(cnt2[2*n] == n) ret2++;
      }
      if(mp2[a].first == mp2[a].second) {
        cnt2[2*n+1]++;
        if(cnt2[2*n+1] == n) ret2++;
      }
    }

    // REP(i, 2*n+2) cout << cnt1[i] << " "; cout << endl;
    // cout << "i:" << i << " " << ret1 << " " << ret2 << endl;
    if(ret1 >= u && ret2 >= v) {
      res = 0;
    } else if(ret1 >= u) {
      res = 1;
    } else if(ret2 >= v) {
      res = 2;
    }
  }

  if(res == 0 || res == -1) cout << "DRAW" << endl;
  else if(res == 1) cout << "USAGI" << endl;
  else if(res == 2) cout << "NEKO" << endl;

  return 0;
}

Measured memory_bytes: 34360