Xiao C and Xiao D are playing a thriving game.
This game features 3 types of cards: Kill, Dodge, and Slash. Their uses are as follows:
- Kill: Used against the opponent. The opponent must use a Dodge card, otherwise they lose the game; or respond to the opponent's Slash.
- Dodge: Used to respond to the opponent's Kill.
- Slash: Used against the opponent. The opponent must use a Kill card, otherwise they lose the game.
Players must discard any card they use.
Starting with Xiao C, turns alternate between Xiao C and Xiao D. During a player's turn, they may play any number of Kill and Slash cards, and the opponent must provide the corresponding response. Of course, a player may also choose not to play any cards and pass the turn to the opponent.
Xiao C has $c_1$ Kills, $c_2$ Dodges, and $c_3$ Slashes. Xiao D has $d_1$ Kills, $d_2$ Dodges, and $d_3$ Slashes. Both players know each other's hand. Determine the outcome of the game assuming both players play optimally.
Input
This problem contains multiple test cases.
The first line contains an integer $T$, representing the number of test cases.
Each test case consists of a single line containing six integers $c_1, c_2, c_3, d_1, d_2, d_3$.
Output
For each test case, output one line:
- If Xiao C can win assuming optimal play from both sides, output
C. - If Xiao D can win assuming optimal play from both sides, output
D. - If the game results in a draw (neither can win) assuming optimal play from both sides, output
E.
Examples
Input 1
3 3 1 4 1 5 9 1 1 4 5 1 4 5 2 1 2 6 3
Output 1
C D E
Note 1
For the first test case, Xiao C can play a Slash, and after Xiao D responds with a Kill, play another Slash. At this point, Xiao D has run out of Kills and cannot respond, thus losing the game.
Example 2
See game/game2.in and game/game2.ans in the additional files.
Constraints
For $100\%$ of the data, $1 \le T \le 10^5$, $0 \le c_1, c_2, c_3, d_1, d_2, d_3 \le 10^9$.
| Test Case ID | Special Properties |
|---|---|
| $1\sim3$ | $c_3=d_3=0$ |
| $4\sim6$ | $c_1=d_2$ and $c_2=d_1$ |
| $7\sim10$ | None |