A look-and-say sequence is a sequence of integers expressed in decimal notation, where each successive term is generated by describing the previous one.
For example, if x_1 (the first term of the sequence) is , the next term is the description of this term, ("one "), which is described by ("two "), then ("one one "), and so on. The sequence continues as , , , ...
Your task is to write a program that, given the first term x_1 of a look-and-say sequence, calculates the -th digit of the -th term x_i.
Each line in the input contains a test case specified by integers: x_1, , and , where 1 \leq x_1 \leq 1000, 1 \leq i \leq 1000, and 1 \leq j \leq \min(\log_{10}(x_i) + 1, 1000). The end of input is indicated by the line .
For each test case, output a line with the -th digit of the term x_i of the look-and-say sequence starting with x_1.
Example 1