## DMOPC '19 Contest 1 P2 - Good Writing

View as PDF

Points: 7
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

A 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 -th character of .
Characters are indexed starting at . If consists of less than characters, output .

In all tests,

#### Input Specification

The first line contains an integer, .
The following lines each contains two integers, and in that order.

#### Output Specification

On the th line, output the answer to the th 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