Problem D. Durak

Author:Антон Карабанов   Time limit:3 sec
Input file:Standard input   Memory limit:256 Mb
Output file:Standard output  

Statement

Cards with sequential numbers from 1 to n are randomly distributed between two players. The game then begins following the classic rules of the card game "Durak". The first player selects one (any) of their cards and places it on the table. If the second player has at least one card with a number greater than the one placed, they "beat" the card, after which both cards are removed from the game. Otherwise, the second player adds the card to their hand. In the first case, the second player takes the next turn, and in the second case, the first player continues playing. The goal of the game is to be the first to get rid of all your cards.

Input format

The input consists of two lines, each containing non-empty sets of numbers ordered in ascending order — the sets of cards for the first and second players, respectively. The numbers are separated by spaces. The first player always goes first.

Output format

You need to output one of the following results for the first player under the best strategy for both players:

Defeat — if the second player wins,

Draw — if the game ends in a draw,

Win — if the first player wins.

Constraints

2 ≤ n ≤ 12

Example explanation

In the first example, the first player has a card with the number 1, and the second player has a card with the number 2. The game will end in a draw in one round (the second player will beat the card of the first player, and both players will have no cards left).

In the second example, the first player has cards with numbers 1 and 4, and the second player has cards with numbers 2 and 3.

The first player has an advantage if they start with card 4. The second player is forced to take it, after which the first player will get rid of all their cards on the next move.

If the first player had played the card 1 on their first move, the game would have ended in a draw.

In the third example, the weak cards of the first player will allow the second player to win easily.

Sample tests

No. Standard input Standard output
1
1
2
Draw
2
1 4
2 3
Win
3
1 3
2 4 5
Defeat

0.060s 0.007s 13