- Time limit: 1.00 s
- Memory limit: 256 MB
You are given a simple, undirected graph that consists of nodes and edges.
Your task is to paint each node red or blue so that there are at least edges such that their nodes have a different color.
Input
The first input line contains an integer : the number of test cases. After this, there are test cases that are described as follows:
The first line contains two integers and : the number of nodes and edges in the graph. The nodes are numbered .
After this, there are lines that describe the edges. Each line contains two integers and . This means that there is an edge between nodes and .
Output
For each test case, output a line that contains space separated characters that describe the colors of the nodes. Each character must be R (red) or B (blue).
There is always a solution, and you can output any valid solution.
Constraints
- the sum of all and values it at most
Example
Input:
3 2 1 1 2 4 4 1 2 2 3 3 4 1 4 5 3 1 2 1 3 1 4
Output:
R B B B R B R B B B B