Bridge is a complex card game, and bidding is one of the hardest parts to master. It is made harder because players use different bidding conventions (agreed meanings for bids). In this problem you write a program that suggests the opening bid a player should make. The conventions below are a simplified set.
A bridge hand has 13 cards. Each card has a suit (spades, hearts, diamonds, or clubs) and a rank (A, K, Q, J, T, 9, 8, 7, 6, 5, 4, 3, 2), where T stands for the rank 10. Before bidding, a player evaluates the number of high card points (hcp) in the hand and the distribution (how many cards are in each suit). Each card contributes hcp based only on its rank:
| Rank | hcp |
|---|---|
| A | 4 |
| K | 3 |
| Q | 2 |
| J | 1 |
| others | 0 |
For example, consider this hand:
It has 13 hcp and a distribution of 5-5-2-1 (a distribution is written in non-increasing order). A balanced distribution is any of 4-3-3-3, 4-4-3-2, and 5-3-3-2.
An opening bid is either "Pass" or a level (1-7) together with a trump suit. From highest to lowest, the trump suits rank: No Trump, Spades, Hearts, Diamonds, Clubs. After evaluating the hand, apply the rules below to choose the opening bid. When several rules apply, use the first one that applies. An "x" in a distribution may stand for any non-negative number, and different x's need not be equal.
In the example hand above, rule 9a applies, so the bid is 1 Hearts.
The input contains several cases. Each case is one line describing a bridge hand, with the 13 cards separated by single spaces. Each card is a two-character string: the first character is the suit (S, H, D, C) and the second is the rank (A, K, Q, J, T, 9, 8, 7, 6, 5, 4, 3, 2). The input ends at end-of-file.
For each hand, print one line in the form Hand #k: bid, where k is the hand number starting at 1. The bid is either Pass, or a level followed by a single space and a suit name (No Trump, Spades, Hearts, Diamonds, or Clubs).