#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;

int diff_row_hidariue[3] = {0,1,1},diff_col_hidariue[3] = {1,0,1};
int diff_row_migiue[2] = {1,1},diff_col_migiue[2] = {-1,0};

int n,u,v,m;

struct Info{
	int row,col,value;
	bool exist,checked;
};

struct Data{
	Data(int arg_row,int arg_col){
		row = arg_row;
		col = arg_col;
	}

	int row,col;
};

bool rangeCheck(int row,int col){
	if(row >= 0 && row <= n-1 && col >= 0 && col <= n-1)return true;
	else{
		return false;
	}
}


int main(){

	scanf("%d %d %d %d",&n,&u,&v,&m);

	Info* loc_USAGI = (Info*)malloc(sizeof(Info)*(1000001));
	Info* loc_NEKO = (Info*)malloc(sizeof(Info)*(1000001));

	for(int i = 1; i <= 1000000; i++){
		loc_USAGI[i].exist = false;
		loc_NEKO[i].exist = false;
	}

	Info** map_USAGI = (Info**)malloc(sizeof(Info*)*n);
	Info** map_NEKO = (Info**)malloc(sizeof(Info*)*n);
	for(int i = 0; i < n; i++){
		map_USAGI[i] = (Info*)malloc(sizeof(Info)*n);
		map_NEKO[i] = (Info*)malloc(sizeof(Info)*n);
	}

	bool** to_Migi_USAGI = new bool*[n];
	bool** to_Migi_NEKO = new bool*[n];
	bool** to_Shita_USAGI = new bool*[n];
	bool** to_Shita_NEKO = new bool*[n];
	bool** to_Migishita_USAGI = new bool*[n];
	bool** to_Migishita_NEKO = new bool*[n];
	bool** to_Hidarishita_USAGI = new bool*[n];
	bool** to_Hidarishita_NEKO= new bool*[n];
	for(int i = 0; i < n; i++){
		to_Migi_USAGI[i] = new bool[n];
		to_Migi_NEKO[i] = new bool[n];
		to_Shita_USAGI[i] = new bool[n];
		to_Shita_NEKO[i] = new bool[n];
		to_Migishita_USAGI[i] = new bool[n];
		to_Migishita_NEKO[i] = new bool[n];
		to_Hidarishita_USAGI[i] = new bool[n];
		to_Hidarishita_NEKO[i] = new bool[n];
		for(int k = 0; k < n; k++){
			to_Migi_USAGI[i][k] = false;
			to_Migi_NEKO[i][k] = false;
			to_Shita_USAGI[i][k] = false;
			to_Shita_NEKO[i][k] = false;
			to_Migishita_USAGI[i][k] = false;
			to_Migishita_NEKO[i][k] = false;
			to_Hidarishita_USAGI[i][k] = false;
			to_Hidarishita_NEKO[i][k] = false;
		}
	}

	for(int row = 0; row < n; row++){
		for(int col = 0; col < n; col++){
			map_USAGI[row][col].checked = false;
			map_NEKO[row][col].checked = false;
		}
	}

	for(int row = 0; row < n; row++){
		for(int col = 0; col < n; col++){
			scanf("%d",&map_USAGI[row][col].value);
			loc_USAGI[map_USAGI[row][col].value].exist = true;
			loc_USAGI[map_USAGI[row][col].value].row = row;
			loc_USAGI[map_USAGI[row][col].value].col = col;
		}
	}

	for(int row = 0; row < n; row++){
		for(int col = 0; col < n; col++){
			scanf("%d",&map_NEKO[row][col].value);
			loc_NEKO[map_NEKO[row][col].value].exist = true;
			loc_NEKO[map_NEKO[row][col].value].row = row;
			loc_NEKO[map_NEKO[row][col].value].col = col;
		}
	}

	vector<Data> Usagi_D,Neko_D;

	int tmp,usagi_line,neko_line,count,start_row,start_col,tmp_row,tmp_col;
	int usagi_check_num = 0,neko_check_num = 0;

	bool usagi_FLG,neko_FLG;

	for(int loop = 0; loop < m; loop++){
		scanf("%d",&tmp);

		usagi_FLG = false;
		neko_FLG = false;

		if(loc_USAGI[tmp].exist == true){
			usagi_check_num++;
			usagi_FLG = true;
			map_USAGI[loc_USAGI[tmp].row][loc_USAGI[tmp].col].checked = true;

			if(loc_USAGI[tmp].row == 0 || loc_USAGI[tmp].col == 0){
				Usagi_D.push_back(Data(loc_USAGI[tmp].row,loc_USAGI[tmp].col));
			}
		}
		if(loc_NEKO[tmp].exist == true){
			neko_check_num++;
			neko_FLG = true;
			map_NEKO[loc_NEKO[tmp].row][loc_NEKO[tmp].col].checked = true;

			if(loc_NEKO[tmp].row == 0 || loc_NEKO[tmp].col == 0){
				Neko_D.push_back(Data(loc_NEKO[tmp].row,loc_NEKO[tmp].col));
			}
		}

		usagi_line = 0;
		if(usagi_FLG && usagi_check_num >= n){
			for(int i = 0; i < Usagi_D.size(); i++){
				start_row = Usagi_D[i].row;
				start_col = Usagi_D[i].col;

				if(n > 1){

					if(start_row == 0 && start_col == 0){
						for(int k = 0; k < 3; k++){
							tmp_row = start_row;
							tmp_col = start_col;
							count = 0;

							switch(k){
							case 0:
								if(to_Migi_USAGI[start_row][start_col]){
									usagi_line++;
									continue;
								}
								break;
							case 1:
								if(to_Shita_USAGI[start_row][start_col]){
									usagi_line++;
									continue;
								}
								break;
							case 2:
								if(to_Migishita_USAGI[start_row][start_col]){
									usagi_line++;
									continue;
								}
								break;
							}

							while(rangeCheck(tmp_row,tmp_col) == true && map_USAGI[tmp_row][tmp_col].checked == true){
								count++;
								tmp_row = tmp_row + diff_row_hidariue[k];
								tmp_col = tmp_col + diff_col_hidariue[k];
							}
							if(count >= n){
								usagi_line++;

								switch(k){
								case 0:
									to_Migi_USAGI[start_row][start_col] = true;
									break;
								case 1:
									to_Shita_USAGI[start_row][start_col] = true;
									break;
								case 2:
									to_Migishita_USAGI[start_row][start_col] = true;
									break;
								}
							}
						}
					}else if(start_row == 0 && start_col == n-1){
						for(int k = 0; k < 2; k++){
							tmp_row = start_row;
							tmp_col = start_col;
							count = 0;

							if(k == 0){
								if(to_Hidarishita_USAGI[start_row][start_col]){
									usagi_line++;
									continue;
								}
							}else{
								if(to_Shita_USAGI[start_row][start_col]){
									usagi_line++;
									continue;
								}
							}


							while(rangeCheck(tmp_row,tmp_col) == true && map_USAGI[tmp_row][tmp_col].checked == true){
								count++;
								tmp_row = tmp_row + diff_row_migiue[k];
								tmp_col = tmp_col + diff_col_migiue[k];
							}
							if(count >= n){
								usagi_line++;

								if(k == 0){
									to_Hidarishita_USAGI[start_row][start_col] = true;
								}else{
									to_Shita_USAGI[start_row][start_col] = true;
								}
							}
						}
					}else if(start_row == 0){
						tmp_row = start_row;
						tmp_col = start_col;
						count = 0;
						if(to_Shita_USAGI[start_row][start_col]){
							usagi_line++;
						}else{
							while(rangeCheck(tmp_row,tmp_col) == true && map_USAGI[tmp_row][tmp_col].checked == true){
								count++;
								tmp_row = tmp_row + diff_row_hidariue[1];
								tmp_col = tmp_col + diff_col_hidariue[1];
							}
							if(count >= n){
								usagi_line++;
								to_Shita_USAGI[start_row][start_col] = true;
							}
						}
					}else{ //tmp_col == 0
						tmp_row = start_row;
						tmp_col = start_col;
						count = 0;
						if(to_Migi_USAGI[start_row][start_col]){
							usagi_line++;
						}else{
							while(rangeCheck(tmp_row,tmp_col) == true && map_USAGI[tmp_row][tmp_col].checked == true){
								count++;
								tmp_row = tmp_row + diff_row_hidariue[0];
								tmp_col = tmp_col + diff_col_hidariue[0];
							}
							if(count >= n){
								usagi_line++;
								to_Migi_USAGI[start_row][start_col] = true;
							}
						}
					}
				}else{
					usagi_line = 1;
				}
			}
		}

		neko_line = 0;
		if(neko_FLG && neko_check_num >= n){
			for(int i = 0; i < Neko_D.size(); i++){
				start_row = Neko_D[i].row;
				start_col = Neko_D[i].col;

				if(n > 1){
					if(start_row == 0 && start_col == 0){
						for(int k = 0; k < 3; k++){
							tmp_row = start_row;
							tmp_col = start_col;
							count = 0;

							switch(k){
							case 0:
								if(to_Migi_NEKO[start_row][start_col]){
									neko_line++;
									continue;
								}
								break;
							case 1:
								if(to_Shita_NEKO[start_row][start_col]){
									neko_line++;
									continue;
								}
								break;
							case 2:
								if(to_Migishita_NEKO[start_row][start_col]){
									neko_line++;
									continue;
								}
								break;
							}

							while(rangeCheck(tmp_row,tmp_col) == true && map_NEKO[tmp_row][tmp_col].checked == true){
								count++;
								tmp_row = tmp_row + diff_row_hidariue[k];
								tmp_col = tmp_col + diff_col_hidariue[k];
							}
							if(count >= n){
								neko_line++;

								switch(k){
								case 0:
									to_Migi_NEKO[start_row][start_col] = true;
									break;
								case 1:
									to_Shita_NEKO[start_row][start_col] = true;
									break;
								case 2:
									to_Migishita_NEKO[start_row][start_col] = true;
									break;
								}
							}
						}
					}else if(start_row == 0 && start_col == n-1){
						for(int k = 0; k < 2; k++){
							tmp_row = start_row;
							tmp_col = start_col;
							count = 0;

							if(k == 0){
								if(to_Hidarishita_NEKO[start_row][start_col]){
									neko_line++;
									continue;
								}
							}else{
								if(to_Shita_NEKO[start_row][start_col]){
									neko_line++;
									continue;
								}
							}


							while(rangeCheck(tmp_row,tmp_col) == true && map_NEKO[tmp_row][tmp_col].checked == true){
								count++;
								tmp_row = tmp_row + diff_row_migiue[k];
								tmp_col = tmp_col + diff_col_migiue[k];
							}
							if(count >= n){
								neko_line++;

								if(k == 0){
									to_Hidarishita_NEKO[start_row][start_col] = true;
								}else{
									to_Shita_NEKO[start_row][start_col] = true;
								}
							}
						}
					}else if(start_row == 0){
						tmp_row = start_row;
						tmp_col = start_col;
						count = 0;
						if(to_Shita_NEKO[start_row][start_col]){
							neko_line++;
						}else{
							while(rangeCheck(tmp_row,tmp_col) == true && map_NEKO[tmp_row][tmp_col].checked == true){
								count++;
								tmp_row = tmp_row + diff_row_hidariue[1];
								tmp_col = tmp_col + diff_col_hidariue[1];
							}
							if(count >= n){
								neko_line++;
								to_Shita_NEKO[start_row][start_col] = true;
							}
						}
					}else{ //tmp_col == 0
						tmp_row = start_row;
						tmp_col = start_col;
						count = 0;
						if(to_Migi_NEKO[start_row][start_col]){
							neko_line++;
						}else{

							while(rangeCheck(tmp_row,tmp_col) == true && map_NEKO[tmp_row][tmp_col].checked == true){
								count++;
								tmp_row = tmp_row + diff_row_hidariue[0];
								tmp_col = tmp_col + diff_col_hidariue[0];
							}
							if(count >= n){
								neko_line++;
								to_Migi_NEKO[start_row][start_col] = true;
							}
						}
					}

				}else{
					neko_line = 1;
				}
			}
		}



		if(usagi_line >= u && neko_line >= v){
			printf("DRAW\n");
			return 0;
		}else if(usagi_line >= u && neko_line < v){
			printf("USAGI\n");
			return 0;
		}else if(usagi_line < u && neko_line >= v){
			printf("NEKO\n");
			return 0;
		}
	}

	printf("DRAW\n");

	return 0;
}

Measured memory_bytes: 39492