Codeforces Round 305 (Div. 1)
D
Mike and Fish
Codeforces
2600
原题
← CE →
翻译中…

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.

翻译中…

image

翻译中…

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

翻译中…

The first line of input contains integer $*n*$ ($1 ≤ *n* ≤ 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 ≤ *x*_{*i*}, *y*_{*i*} ≤ 2 × 10^{5}$), the $*i*$-th point coordinates.

翻译中…

It is guaranteed that there is at least one valid answer.

翻译中…

Output

翻译中…

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.

翻译中…

样例

Input #1
4
1 1
1 2
2 1
2 2
Output #1
brrb
InputCopy OutputCopy
Input #2
3
1 1
1 2
2 1
Output #2
brr
InputCopy OutputCopy
题目信息
题号
547D
时间限制
3 s
内存限制
256 MB
标签
构造
DFS 及类似
图论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。