You're given an integer and integer ,you're asked to print the i_{th} digit of S=(\underbrace{999...99}_{n \text{ times}})^2 MUST use straight digit convolution , no shortcuts.
If no such digit i.e. i>|S| then print .
The first line contains single integer (1 \le t \le 10^5) – the number of test cases.
The first line of each test case contains two integers (1 \le n \le 10^{18} ; 1 \le i \le 5 \cdot 10^{18}) – the integer and the required index.
For each test case , The answer for MUST use straight digit convolution , no shortcuts it.
Example 1
In the First , Second , Third and Fourth test cases we've 99^2=9801 :
1_{st} (from left to right) digit is .
3_{rd} (from left to right) digit is .
2_{nd} (from left to right) digit is .
4_{th} (from left to right) digit is .
Subtask ( points) : (i=1)
Subtask ( points) : (n \le 9)
Subtask ( points) : (1 \le \sum n \le 10^6)
Subtask ( points) : No additional constraints.