Recursive Texting

All of you have typed in mobile phones. In this problem, you will have to do a similar thing. You are given a word. You will have to process it. There are two phases in each step. Type the given word using standard mobile keyboard, that is, press the digit containing the required letter once. Convert each digit found in the first phase into word, con- catenate those words, and produce a new word. For example, if you are asked to type DHAKA. Step 1, phase 1: 34252 Step 1, phase 2: THREEFOURTWOFIVETWO Step 2, phase 1: 8473336878963483896 Step 2, phase 2: EIGHTFOURSEVENTHREETHREETHREESIXEIGHTSEVENEIGHTNINESIXTHREEFOUREIGHTTHREEEIGHTNINESIX And so on... Your job is to find the k-th character after n-th step. Input First line of input will consist of number of test cases, T (1 ≤ T ≤ 1000). Each of the next T lines containstheinitialword,W (1≤|W|≤100),n(1≤n≤20),k(1≤k≤109),separatedbyaspace. n will be such that k-th character is always found. The initial word will contain only uppercase letter of English alphabet and no space within it. Output For each test case, first print the test case number, followed by the k-th character after processing the initial word up to n-th step. Note: Spellings of the digits: 0 – ZERO, 1 – ONE, 2 – TWO, 3 – THREE, 4 – FOUR, 5 – FIVE, 6 – SIX, 7 – SEVEN, 8 – EIGHT, 9 – NINE Sample Input 4 DHAKA 1 1 DHAKA 2 1 DHAKA 1 5 DHAKA 2 10

2/2 Sample Output Case 1: T Case 2: E Case 3: E Case 4: S