#include<cstdio>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

int n,u,v,m,tmp;
int c[1000001];
int usa[1000001][2],neko[1000001][2];
int row[2][500],col[2][500],dia[2][2];
int U,V;

int main(){
  scanf("%d%d%d%d",&n,&u,&v,&m);
  rep(i,1000001)rep(j,2)usa[i][j] = neko[i][j] = -1;

  rep(i,n)rep(j,n){
    scanf("%d",&tmp);
    usa[tmp][0] = i; usa[tmp][1] = j;
  }
  rep(i,n)rep(j,n){
    scanf("%d",&tmp);
    neko[tmp][0] = i; neko[tmp][1] = j;
  }
  rep(i,2){
    rep(j,n)row[i][j] = col[i][j] = 0;
    dia[i][0] = dia[i][1] = 0;
  }
  U = V = 0;

  if(n==1){ u*=4; v*=4; }

  rep(i,m)scanf("%d",&c[i]);
 
  bool f = false;
  rep(i,m){
    if(usa[c[i]][0]>=0){
      int y = usa[c[i]][0], x = usa[c[i]][1];
      row[0][y]++;
      if(row[0][y]==n)U++;

      col[0][x]++;
      if(col[0][x]==n)U++;

      if(x == y){
	dia[0][0]++;
	if(dia[0][0]==n)U++; 
      }
      if(x+y == n-1){
	dia[0][1]++;
	if(dia[0][1]==n)U++;
      }
    }
    
    if(neko[c[i]][0]>=0){
      int y = neko[c[i]][0], x = neko[c[i]][1];
      row[1][y]++;
      if(row[1][y]==n)V++;

      col[1][x]++;
      if(col[1][x]==n)V++;

      if(x == y){
	dia[1][0]++;
	if(dia[1][0]==n)V++;
      }
      if(x + y == n-1){
	dia[1][1]++;
	if(dia[1][1]==n)V++;
      }
    }

    if(U>=u && V>=v){
      break;
    }else if(U>=u){
      printf("USAGI\n");
      f = true; break;
    }else if(V>=v){
      printf("NEKO\n");
      f = true; break;
    }
  }
  if(!f)printf("DRAW\n");
}