DMOPC '19 Contest 1 P2 - Good Writing
View as PDFA teacher once said: "Good writing is good writing is good writing."
Hence, the teacher defines  "Good writing is good writing is good writing."
To make the quote more interesting the teacher defines  "Good writing is good " 
 " writing is good " 
 " is good writing." for all 
.
For example,  is
Good writing is good Good writing is good writing is good writing. writing is good Good writing is good writing is good writing. is good writing.
Note that the quotation marks are not part of .
The teacher wants to ask  questions. Each time she wants to find the 
 character of 
.
Characters are indexed starting at . If 
 consists of less than 
 characters, output 
..
Constraints
Input Specification
The first line contains an integer, .
The following  lines each contains two integers, 
 and 
 in that order.
Output Specification
On the  line, output the answer to the 
 question.
Sample Input 1
3
0 4
1 100
1 1111111
Sample Output 1
d
g
.
Sample Input 2
3
0 6
1 13
1 22
Sample Output 2
w
 
G
Comments
I see you guys still haven't gotten over
bro are you alright