Vanya decided to build an infinite pyramid of red and blue cubes according to a special rule.
The rows of the pyramid are numbered from bottom to top, starting from one, and the cubes in each row are numbered from left to right, also starting from one. In the first row (the base of the pyramid), the cubes are arranged in groups of alternating colors: first comes one red cube, then two blue cubes, then three red cubes, then four blue cubes, and so on — the $$$i$$$-th group consists of $$$i$$$ cubes of one color.
Each next row is built on top of the previous one: for each $$$k \ge 1$$$, the cube in the $$$n$$$-th row ($$$n \ge 2$$$) at position $$$k$$$ is placed exactly halfway above the cubes at positions $$$k$$$ and $$$k + 1$$$ of the $$$(n - 1)$$$-th row. The color of the new cube is chosen according to the following rule:
Unfortunately, there were not enough cubes to finish building the infinite pyramid, but Vanya is very interested in which colors the cubes would have in certain positions.
Given the row number $$$n$$$ and the position $$$k$$$, determine the color of the corresponding cube for each query.
The first line contains an integer $$$q$$$ — the number of queries ($$$1 \le q \le 10^5$$$). The next $$$q$$$ lines contain two numbers $$$n$$$ and $$$k$$$ each — the row and the position of the cube in that row whose color needs to be determined ($$$1 \le n \le 10^5$$$; $$$1 \le k \le 10^{18}$$$).
For each query, output "R" on a separate line if the cube at the specified position is red, and "B" otherwise.
10 1 1 1 2 1 3 1 4 2 1 2 2 2 3 3 1 3 2 4 1
R B B R B R B B B R
The figure shows a fragment of the pyramid consisting of ten cubes, with the base on the first four cubes of the first row:
In the first row ($$$n = 1$$$), first comes a group of one red cube at position $$$1$$$, then a group of two blue cubes at positions $$$2$$$ and $$$3$$$, after which a group of three red cubes begins (the figure shows its first cube at position $$$4$$$).
In the second row ($$$n = 2$$$):
The colors of the cubes in rows $$$n = 3$$$ and $$$4$$$ are determined similarly.