

実行時間制限: 2 sec / メモリ制限: 256 MiB
Problem
The string S is exactly the same as the string A repeated 10^{100} times.
Output the B-th letter of the string S.
Input
Input will be given in the following format from the Standard Input.
A B
- On the first line, you will be given a string A (1 ≦ |A| ≦ 50). Each character in the string A will be a lowercase English alphabet letter.
- On the second line, you will be given a integer B (1 ≦ B ≦ 1,000,000,000).
Achievements and Points
- When you pass every test case where 1 ≦ B ≦ 100,000 , you will be awarded 20 points.
- In addition, if you pass all the rest test cases you will be awarded 80 more points.
Output
Output the B-th letter of the string S in one line. Make sure to insert a line break at the end of the output.
Input Example 1
abc 7
Output Example 1
a
The beggining of string S is abcabcabcabc
...
Therefore, the 7th letter is a
.
Input Example 2
bbb 9
Output Example 2
b
Each letter in the string S is b
, so the 9th letter is also b
.
Input Example 3
kljhasdfkjahfadfakhsdfaklh 1000000000
OutPut Example 3
h
Note that a large number could be in the input.