#include<cstdio>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int n,m,card[100000];

int solve(const int A[500][500],int win){ // win : ツ堕オツつヲツづゥツづ猟つォツ療アツづ個古つ青?
	static int X[1000001],Y[1000001];
	rep(i,1000001) X[i]=-1;
	rep(i,n) rep(j,n) X[A[i][j]]=j, Y[A[i][j]]=i;

	int tate[500]={},yoko[500]={},naname1=0,naname2=0;
	rep(i,m){
		if(X[card[i]]==-1) continue;

		int x=X[card[i]],y=Y[card[i]];
		if(++tate[x]==n) win--;
		if(++yoko[y]==n) win--;
		if(x-y== 0  && ++naname1==n) win--;
		if(x+y==n-1 && ++naname2==n) win--;

		if(n==1) win+=3;

		if(win<=0) return i;
	}
	return m;
}

int main(){
	int usagi,neko; scanf("%d%d%d%d",&n,&usagi,&neko,&m);
	static int U[500][500],N[500][500];
	rep(i,n) rep(j,n) scanf("%d",U[i]+j);
	rep(i,n) rep(j,n) scanf("%d",N[i]+j);
	rep(i,m) scanf("%d",card+i);

	int ans_u=solve(U,usagi);
	int ans_n=solve(N,neko);
	if     (ans_u<ans_n) puts("USAGI");
	else if(ans_u>ans_n) puts("NEKO");
	else                 puts("DRAW");

	return 0;
}