There are multiple test cases. The first line of input contains an integer $T$, indicating the number of test cases. For each test case:
The first line contains two integers $n$ and $m(0 \le n < 10^{1000},1 \le m < 10^{100})$.
It is guaranteed that the sum of the length of $n$ does not exceed $20000$.