Limits 1s, 1.0 GB

One of our famous admin of Programming Problem in Bengali group is a diehard supporter of Barcelona FC. When there is a match between Barcelona and Real Madrid he never misses it. Today there is a match between Barcelona and Real Madrid. And as usual he is in front of the TV screen.

The weird fact of today’s match is – there is a GOAL in each and every second of the match (huh!!! ). All the goals may not be valid i.e. some of the goals can be done from OFF SIDE which is out of the rules.

At the end of the match our Barcelona supporter wants to make comment about the match on the famous social networking site FunCook.

The comments he decided to post are - “Aaj Kemon Bodh Korcho” (w/o quotes) if Barcelona won the match, “Hala Madrid” (w/o quotes) if Real Madrid won the match or "Meh :\" (w/o quotes) if there is no winner.

Noticing the time of each goal, he figured out that the goals that are done from OFF SIDE are belongs to a famous series (Sorry I forgot the name of the series). Some values of that series are given below:

0, 1, 1, 2, 3, 5, 8 … … … nn-th term

Now can you help him to decide the suitable comment?

Input

You’re given an integer number TT (0<T1000 < T \le 100) which denotes the number of test cases. In each of the TT line there is a string SS consisting of the characters “B” and “M”. The maximum length of the string will not be greater than 10510^5. Note that, the starting index will be 0.

Here,

  • If the ii-th character is “B” then it denotes a goal is done by Barcelona at ii-th second.

  • If the ii-th character is “M” then it denotes a goal is done by Real Madrid at ii-th second.

Output

For each of the TT lines you have to print the case number first according to the format “Case #X” (w/o quotes) where XX is the case number. Then you have to print “Aaj Kemon Bodh Korcho” (w/o quotes) if Barcelona won the match or “Hala Madrid” (w/o quotes) if Real Madrid won the match. Otherwise print “Meh :\” (w/o quotes).

Sample

InputOutput
2
BBMMMM
MMBBBB
Case #1: Hala Madrid
Case #2: Aaj Kemon Bodh Korcho

Submit

Login to submit.

Statistics

68% Solution Ratio
ArifHosanEarliest, Sep '17
riyad000Fastest, 0.0s
bisnu_sarkarLightest, 131 kB
SabbasachiSutradharShortest, 390B
Toph uses cookies. By continuing you agree to our Cookie Policy.