Submit Best Submissions All Submissions

329. Let's Play Tawla


Problem Statement:
Tawla is the Arabic name of the game Backgammon. In Tawla, 2 players alternate playing two 6-face dice. Each die (singular of dice) face represents a number from 1 to 6 through black dots carved on that face.

Tawla professionals give the numbers 1 to 6 special naming, believed to be adapted from another language. This special naming is as follows:

1: "Yakk"
2: "Doh"
3: "Seh"
4: "Ghar"
5: "Bang"
6: "Sheesh"

Tawla professionals have this habit of saying the dice number after they throw the dice, in order to have some sort of game commentary. The higher number is said first.

Some examples:

- A dice throw of 1 and 2 is: "Doh Yakk"
- A dice throw of 3 and 5 is: "Bang Seh"
- A dice throw of 6 and 4 is: "Sheesh Ghar"

If you know more about Tawla, you would know that a double (2 dice producing the same number) does not follow this rule. For some unknown reason, it doesn't rhyme to say: "Yakk Yakk" or "Doh Doh". The following are their special names:

- A 1-1 dice pair is said: "Habb Yakk"
- A 2-2 dice pair is said: "Dobara"
- A 3-3 dice pair is said: "Dousa"
- A 4-4 dice pair is said: "Dorgy"
- A 5-5 dice pair is said: "Dabash"
- A 6-6 dice pair is said: "Dosh"

One exception to all the above rules is the pair: 5-6 (or 6-5), this one is called "Sheesh Beesh" and not "Sheesh Bang"! As you may have expected, this is for some unknown reason too.

Write a program that translates dice numbers to Tawla words.


Input Format:
Your program will be tested on one or more test cases. The first line of the input will be a single integer T (1 ≤ T ≤ 100) representing the number of test cases. Followed by T test cases. Each test case will consist of a single line, containing 2 integers separated by a single space a and b (1 ≤ a, b ≤ 6) representing the number of black dots carved on the top face of each die.


Output Format:
For each test case print a single line containing "Case n:" (without quotes) where n is the test case number (starting from 1) followed by a space then the Tawla words describing the given dice numbers.


Sample Input:
3 1 2 2 3 3 4


Sample Output:
Case 1: Doh Yakk Case 2: Seh Doh Case 3: Ghar Seh





Added by: ahmed_aly
Added at: 2014-11-20 22:34:25 UTC
Time Limit: 3 seconds
Partial score: No
Source:ACM Arab Collegiate Programming Contest 2014