Little A and little B are playing stone games.There are
N
N
N bottles,labeled 1 to
N
N
N,each with a capacity of
A
i
A_i
Ai.Initially,the bottles are all full.
In each turn,the player takes a certain amount of stones from every bottle. Different from the past, each person takes up at most
r
i
r_i
ri stones from each bottle, (
r
i
<
=
a
i
r_i<=a_i
ri<=ai), and at least takes
l
i
l_i
li stones (
l
i
>
=
0
l_i>=0
li>=0),and put them into the stone library(initially empty).
When
r
i
r_i
ri is greater than
a
i
,
r
i
=
m
i
n
(
r
i
,
a
i
)
a_i, r_i=min(r_i, a_i)
ai,ri=min(ri,ai), when
l
i
l_i
li is greater than
a
i
a_i
ai,
l
i
=
m
i
n
(
l
i
,
a
i
)
l_i=min(l_i, a_i)
li=min(li,ai). You can also choose to take some of the stones from the stone library (independent of the stone pile) and put them back into the original bottle.The first person who takes all the stones wins.
You can assume that everyone takes the best strategy.
Input
First line,
N
,
K
(
1
<
=
K
<
=
N
<
=
1
e
6
)
N, K (1<=K<=N<=1e6)
N,K(1<=K<=N<=1e6)
The second line
a
1
,
a
2
,
.
.
.
,
a
n
(
0
<
=
a
i
<
=
1
e
9
)
a_1, a_2, ..., a_n (0 <= ai < = 1e9)
a1,a2,...,an(0<=ai<=1e9)
The third line
l
1
,
l
2
,
.
.
.
,
l
n
l_1, l_2, ..., l_n
l1,l2,...,ln
The fourth line
r
1
,
r
2
,
.
.
.
,
r
n
(
0
<
=
l
i
<
=
r
i
<
=
a
i
)
r_1, r_2, ..., r_n(0<=l_i<=r_i<=a_i)
r1,r2,...,rn(0<=li<=ri<=ai)
Output
If A wins,print one line “A”,
else if B wins,print one line “B”,
else print one line “Draw”.
Sample Input
3
0 1 2
0 0 0
0 1 2
Sample Output
A