CF547D Mike and Fish
Description
As everyone knows, bears love fish. But Mike is a strange bear; He hates fish! The even more strange thing about him is he has an infinite number of blue and red fish.
He has marked $n$ distinct points in the plane. $i$ -th point is point $(x_{i},y_{i})$. He wants to put exactly one fish in each of these points such that the difference between the number of red fish and the blue fish on each horizontal or vertical line is at most 1.
He can't find a way to perform that! Please help him.
Input Format
The first line of input contains integer $n$ ( $1\leq n\leq 2×10^{5}$ ).
The next $n$ lines contain the information about the points, $i$ -th line contains two integers $x_{i}$ and $y_{i}$ ( $1\leq x_{i},y_{i}\leq 2×10^{5}$ ), the $i$ -th point coordinates.
It is guaranteed that there is at least one valid answer.
Output Format
Print the answer as a sequence of $n$ characters 'r' (for red) or 'b' (for blue) where $i$ -th character denotes the color of the fish in the $i$ -th point.