p01358 Usaneko Matrix
Rabbits and cats are competing. The rules are as follows.

First, each of the two animals wrote n2 integers on a piece of paper in a square with n rows and n columns, and drew one card at a time. Shuffle two cards and draw them one by one alternately. Each time a card is drawn, the two will mark it if the same number as the card is written on their paper. The winning condition is that the number of "a set of n numbers with a mark and is in a straight line" is equal to or greater than the number of playing cards drawn at the beginning.

Answer which of the rabbit and the cat wins up to the mth card given. However, the victory or defeat is when only one of the two cards meets the victory condition when a certain card is drawn and marked. In other cases, it is a draw. Cards may be drawn even after one of them meets the victory conditions, but this does not affect the victory or defeat.



Input

Line 1: “nuvm” (square size, number of rabbit playing cards, number of cat playing cards, number of cards drawn) 2- (N + 1) Line: n2 numbers that the rabbit writes on paper ( N + 2)-(2N + 1) Line: n2 numbers that the cat writes on paper (2N + 2)-(2N + M + 1) Line: m cards drawn
1 ≤ n ≤ 500
1 ≤ u, v ≤ 13
1 ≤ m ≤ 100 000
1 ≤ (number written) ≤ 1 000 000


The number of n2 rabbits write on paper, the number of n2 cats write on paper, and the number of m cards drawn are different.

Output

Output "USAGI" if the rabbit wins, "NEKO" if the cat wins, and "DRAW" if the tie, each in one line.

Examples

Input

3 2 2 10
1 2 3
4 5 6
7 8 9
1 2 3
6 5 4
7 8 9
11
4
7
5
10
9
2
1
3
8


Output

USAGI


Input

3 2 1 10
1 2 3
4 5 6
7 8 9
1 2 3
6 5 4
7 8 9
11
4
7
5
10
9
2
1
3
8


Output

DRAW
```python
# coding: utf-8
n,u,v,m=map(int,input().split())
usa=[list(map(int,input().split())) for i in range(n)]
neko=[list(map(int,input().split())) for i in range(n)]
usadic={}
nekodic={}
usatable=[0 for i in range(2*n+2)]
nekotable=[0 for i in range(2*n+2)]
for i in range(n):
    for j in range(n):
        usadic[usa[i][j]]=[]
        nekodic[neko[i][j]]=[]
        usadic[usa[i][j]].append(i)
        nekodic[neko[i][j]].append(i)
        usadic[usa[i][j]].append(n+j)
        nekodic[neko[i][j]].append(n+j)
        if i==j:
            usadic[usa[i][j]].append(2*n)
            nekodic[neko[i][j]].append(2*n)
        if i+j==n-1:
            usadic[usa[i][j]].append(2*n+1)
            nekodic[neko[i][j]].append(2*n+1)
usacount=0
nekocount=0
for i in range(m):
    t=int(input())
    if t in usadic:
        for x in usadic[t]:
            usatable[x]+=1
            if usatable[x]==n:
                usacount+=1
    if t in nekodic:
        for x in nekodic[t]:
            nekotable[x]+=1
            if nekotable[x]==n:
                nekocount+=1
    if n==1:
        usacount=min(usacount,1)
        nekocount=min(nekocount,1)
    if usacount>=u and nekocount>=v:
        print('DRAW')
        break
    elif usacount>=u:
        print('USAGI')
        break
    elif nekocount>=v:
        print('NEKO')
        break
else:
    print('DRAW')



```