A poker deck contains 52 cards. Each card has a suit — one of clubs, diamonds, hearts, or spades (written C, D, H, S in the input) — and a value — one of 2, 3, 4, 5, 6, 7, 8, 9, T, J, Q, K, A (representing 2, 3, …, 10, jack, queen, king, ace). For scoring, suits are unordered, while values run from lowest (2) to highest (A).
A poker hand is 5 cards. Hands are ranked by the following categories, from lowest to highest:
Given several pairs of hands, decide for each pair which hand — if either — ranks higher.
Note: an ace is only the highest value, so A 2 3 4 5 is not a straight.
Several lines. Each line lists 10 cards separated by spaces: the first 5 cards form the hand of the player named Black, and the next 5 form the hand of the player named White. Input continues until end of file.
For each input line, print exactly one of the following:
Black wins.
White wins.
Tie.