Problem Statement:
The ACM Arab Collegiate Programming Contest (ACPC) 2013 was held in Sharm el-Sheikh at the end of November 2013. Teams from Cairo and Alexandria traveled to the region by bus, and due to the security checks, the trip took 10 hours (4 hours more than normal). Khaled Sami Mohamed, one of the contestants in that region, was also serving in the Egyptian Army his mandatory military service at that time. Since he already spends long periods of time in the army guarding (or as its called "Khedma"), Khaled invented a game to play during these periods so he won't get bored. Seeing that the other contestants were also bored in the bus, he decided to tell them his game. The game is as follows: given two numbers X and Y, skip X letters from the beginning of the string "ACM-ACPC-2013" (without quotes), then skip another Y letters after that (wrapping around to the beginning if you reach the end of the string) and print the letter that appears first after skipping both times.


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, the number of test cases (1 ≤ T ≤ 100). Followed by T lines, each line is a test case which consists of two integers separated by a single space X and Y (1 ≤ X, Y ≤ 106) denoting the numbers described in the problem statement.


Output Format:
For each test case print a single line containing "Case n:" (without the quotes) where n is the test case number (starting from 1) followed by a space then C which is the letter described in the problem statement.


Sample Input:
4 1 1 11 5 20 3 10000 21991


Sample Output:
Case 1: M Case 2: - Case 3: 0 Case 4: 1





Added by: ahmed_aly
Added at: 2014-10-25 09:00:00 UTC
Time Limit: 3 seconds
Partial score: No
Source:ACM Oman Collegiate Programming Contest 2014