Alice and Bob invent a new game based on Texas hold'em. Please read the following rules carefully as they are different from the usual rules. The background of this problem is exactly the same as problem E.
There are $$$13$$$ ranks, which are A, K, Q, J, T, 9, 8, 7, 6, 5, 4, 3, and 2 from high to low. There are $$$4$$$ suits, which are S, H, C, and D. Every combination of a rank and a suit occurs exactly once, so there are $$$52$$$($$$=13\times 4$$$) cards.
A hand is a set of five cards. Each hand has a rank. There are $$$10$$$ types of hands. Each type also has a rank. If two hands are of different types, the hand of the type with a higher rank always ranks higher. A hand can be represented as a sequence $$$(r_1,r_2,r_3,r_4,r_5)$$$, where $$$r_i$$$ is the rank of the $$$i$$$-th card and the order of the five cards depends on the type of the hand. If two hands are of the same type, the hand represented as the lexicographically larger sequence ranks higher: formally, if we find the smallest index $$$i$$$ such that $$$r_i$$$ of two hands are different, the hand with higher $$$r_i$$$ ranks higher. If the types and the sequences $$$r$$$ of two hands are equal, two hands have the same rank.
The $$$10$$$ types are given below, from lowest to highest rank. If a hand matches the patterns of multiple types, it belongs to the one with the highest rank.
Two cards are dealt to each of Alice and Bob. Instead of the regular rules, $$$6$$$ community cards are dealt. Two players take community cards one by one, in turn, until each player has five cards, completing a hand. Alice takes first. The player who has a hand with higher rank wins. If two hands have same rank, there is a draw. Note that all ten cards are shown to both, and they always choose the optimal strategy.
The above are the same in problem E. The task is the following.
Given the cards of Alice, the cards of Bob and the $$$6$$$ community cards, find the winner.
There are multiple test cases. The first line of input contains an integer $$$T$$$ ($$$1\le T\le 10^5$$$), the number of test cases. For each test case:
The first line contains two strings $$$a_1$$$ and $$$a_2$$$: Alice's initial cards.
The second line contains two strings $$$b_1$$$ and $$$b_2$$$: Bob's initial cards.
The third line contains six strings $$$c_1$$$, $$$c_2$$$, $$$c_3$$$, $$$c_4$$$, $$$c_5$$$, and $$$c_6$$$: the community cards.
Each string is of length two. The first character is one of "A", "K", "Q", "J", "T", "9", "8", "7", "6", "5", "4", "3", "2", which represents the rank of a card. The second character is one of "S", "H", "C", "D", which represents the suit of a card.
It is guaranteed that all $$$10$$$ given cards are pairwise distinct.
For each test case:
Output the word "Alice" if Alice wins, "Bob" if Bob wins, or "Draw" if there is a draw.
9JC 4HTS 5DJS JH JD 4S 4C 4DJC 4HTS 5DTH TC TD 5S 5H 5CJC 4HTS 5D4S JS 5S TH TC TD7C 3C7H TH3S 3H 3D 2C 4H 5S7C 3C7H TH2H 4H 5H 6H 8H 9H7C 3C7H THTS 3S 2S 2H 4C 4D2D KH4D JC2S 2H 2C KS KC KD2D KH4D JC4S 4H 4C JS JH JD2D KH4D JC2S KS 4S JS JH JD
Alice Bob Draw Alice Bob Draw Alice Bob Draw