لینکهای مفید برای شرکت در مسابقه:
در طول مسابقه، میتوانید سؤالات خود را از قسمت «سؤال بپرسید» مطرح کنید.
Shamir0xe, believes in binary numbers. After lots of sleepless nights, he managed to crack Moriarty’s magical binary number to help Sherlock beat Moriarty. He realized it’s not a unique number, every number that follows at least two of the following rules, is a magical binary number:
a word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run. ex: “abcba” is palindrome while “abcca” is not.
Your job is to help sherlock determine if a number is a magical binary number or not.
The first line of input shows the number of test cases .
Each of following lines contains an integer .
For each test case, if the number is a magical binary number print Magical
, otherwise print I’m sorry Sherlock :(
.
In the first test case: