#include <bits/stdc++.h>

#define ALL(a) (a).begin(), (a).end()
#define llong long long


using namespace std;

using ARRAY = vector<int>;
using cont = vector<ARRAY>;

struct T{
	ARRAY row, column, naname;
	map<int, pair<size_t, size_t>> idx;
	size_t acc = 0;
	size_t n;

	T(size_t n_, cont m):n(n_), row(n_), column(n_), naname(2){
		for(size_t i = 0; i < n_; i++)for(size_t j = 0; j < n_; j++){
			idx[m[i][j]] = {i,j};
		}
	}
	void ume(int e){
		if(idx.find(e) == idx.end())return;
		auto i = idx[e].first;
		auto j = idx[e].second;
		row[i]++;
		column[j]++;
		if(i == j)naname[0]++;
		if(i == n-1-j)naname[1]++;
		if(row[i] == n){
			acc++;
			row[i]+= n;
		}
		if(column[j] == n){
			acc++;
			column[j] += n;
		}
		if(naname[0] == n){
			acc++;
			naname[0] += n;
		}
		if(naname[1] == n){
			acc++;
			naname[1] += n;
		}
	}

	void print(){
//		for(auto e : row)cerr << e << " ";
//		for(auto e : column)cerr << e << " ";
//		cerr << naname[0] << " ";
//		cerr << naname[1] << endl;
	}
};

void calc(int u, int v, int ub, int nb, ARRAY &m){
	int uacc = 0, nacc = 0;
	for(auto e : m){
		if(e == ub){
			uacc++;
			ub *= -1;
		}
		if(e == nb){
			nacc++;
			nb *= -1;
		}
		if(ub >= u || nb >= v)break;
	}
//	cerr << "C" << u << " " << v << endl;
//	cerr << uacc << " " << nacc << endl;
	if(uacc >= u && nacc >= v){
		cout << "DRAW" << endl;
	}
	else if(uacc >= u){
		cout << "USAGI" << endl;
	}
	else if(nacc >= v){
		cout << "NEKO" << endl;
	}
	else{
		cout << "DRAW" << endl;
	}
}



signed main(){
	int n, u, v, M; cin >> n >> u >> v >> M;
	cont udata(n,ARRAY(n));
	cont ndata(n,ARRAY(n));
	for(auto &&a : udata)for(auto &&e : a)cin >> e;
	for(auto &&a : ndata)for(auto &&e : a)cin >> e;
	ARRAY m(M);
	for(auto &&e : m)cin >> e;
	
	if(n == 1){
		calc(u,v,udata[0][0],ndata[0][0],m);
		return 0;
	}

	T usagi(n,udata), neko(n,ndata);
	set<int> used;
	for(auto e : m){
		if(used.find(e) != used.end())continue;
		usagi.ume(e);
		neko.ume(e);
		used.insert(e);
		if(usagi.acc >= u || neko.acc >= v)break;
	}
//	usagi.print();
//	neko.print();

	if(usagi.acc >= u && neko.acc >= v){
		cout << "DRAW" << endl;
	}
	else if(usagi.acc >= u){
		cout << "USAGI" << endl;
	}
	else if(neko.acc >= v){
		cout << "NEKO" << endl;
	}
	else{
		cout << "DRAW" << endl;
	}

	return 0;
}


/*
signed main(){
	int n, u, v, M; cin >> n >> u >> v >> M;
	cont usagi(n,ARRAY(n));
	cont neko(n,ARRAY(n));
	for(auto &&a : usagi)for(auto &&e : a)cin >> e;
	for(auto &&a : neko)for(auto &&e : a)cin >> e;
	ARRAY m(M);
	for(auto &&e : m)cin >> e;

	map<int, pair<int,int>> uidx, nidx;
	for(size_t i = 0; i < n; i++)for(size_t j = 0; j < n; j++){
		uidx[usagi[i][j]] = {i,j};
		nidx[neko[i][j]] = {i,j};
	}

	ARRAY ub(2*n+2);
	ARRAY nb(2*n+2);
//	for(auto e : uidx)cerr << e.second.first << "," << e.second.second << " ";cerr << endl;

	int uacc = 0, nacc = 0;
	for(auto e : m){
//		cerr << e << endl;
		if(uidx.find(e) != uidx.end()){
			auto ut = uidx[e];
//			cerr << "u " << ut.first << " ," << ut.second << endl;
			ub[ut.first]++; ub[n+ut.second]++;
			if(ub[ut.first] == n){
				uacc++;
				ub[ut.first] = -(int)1e9;
			}
			if(ub[n+ut.second] == n){
				uacc++;
				ub[n+ut.second] = -(int)1e9;
			}
			if(ut.first == ut.second){
				ub[2*n]++;
				if(ub[2*n] == n){
					uacc++;
					ub[2*n] = -(int)1e9;
				}
			}
			if(ut.first == n-ut.second-1){
				ub[2*n+1]++;
				if(ub[2*n+1] == n){
					uacc++;
					ub[2*n+1] = -(int)1e9;
				}
			}

		}
		if(nidx.find(e) != nidx.end()){
			auto nt = nidx[e];
//			cerr << "n " << nt.first << " ," << nt.second << endl;
			nb[nt.first]++; nb[n+nt.second]++;
			if(nb[nt.first] == n){
				nacc++;
				nb[nt.first] = -(int)1e9;
			}
			if(nb[n+nt.second] == n){
				nacc++;
				nb[n+nt.second] = -(int)1e9;
			}
			if(nt.first == nt.second){
				nb[2*n]++;
				if(nb[2*n] == n){
					nacc++;
					nb[2*n] = -(int)1e9;
				}
			}
			if(nt.first == n-nt.second-1){
				nb[2*n+1]++;
				if(nb[2*n+1] == n){
					nacc++;
					nb[2*n+1] = -(int)1e9;
				}
			}
		}
		if(e == 1){
//			for(auto e : ub)cerr <<e  << " "; cerr << endl;
//			for(auto e : nb)cerr <<e  << " "; cerr << endl;
//			cerr << endl;
		}
		if(uacc >= u || nacc >= v)break;
	}
//	for(auto e : ub)cerr <<e  << " "; cerr << endl;
//	for(auto e : nb)cerr <<e  << " "; cerr << endl;
//	cerr << uacc << " " << nacc << endl;
	if(uacc >= u && nacc >= v){
		cout << "DRAW" << endl;
	}
	else if(uacc >= u){
		cout << "USAGI" << endl;
	}
	else if(nacc >= u){
		cout << "NEKO" << endl;
	}
	else{
		cout << "DRAW" << endl;
	}
		


	

	return 0;
}
*/



Measured memory_bytes: 22964