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*<sub class="lower-index">*i*</sub>, *y*<sub class="lower-index">*i*</sub>). 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.
The first line of input contains integer *n* (1 ≤ *n* ≤ 2 × 10<sup class="upper-index">5</sup>).

The next *n* lines contain the information about the points, *i*-th line contains two integers *x*<sub class="lower-index">*i*</sub> and *y*<sub class="lower-index">*i*</sub> (1 ≤ *x*<sub class="lower-index">*i*</sub>, *y*<sub class="lower-index">*i*</sub> ≤ 2 × 10<sup class="upper-index">5</sup>), the *i*-th point coordinates.

It is guaranteed that there is at least one valid answer.
import operator as op
from sys import stdin,stdout

f_range=range
f_len=len

def FuerzaBruta(points):

    answer=[0]*f_len(points) 
    answer[0]=color=0
    
    p=sorted(points,key=op.itemgetter(0,1))
    for i in f_range(f_len(points)):
        flag=False
        if(i==f_len(p)-1):
            break
        if p[i][0][0]==p[i+1][0][0]:
            ind=p[i+1][1]
            answer[ind]=color^1
            color=color^1
            continue
        j=i
        for x in f_range(0,i+1):
            if p[j][0][1]==p[i+1][0][1]:
                ind=p[i+1][1]
                answer[ind]=color=answer[p[j][1]]^1
                # color=color[i]^1
                flag=True
                break
            if j==0:
                break
            j-=1
        if not flag:
            answer[i+1]=color
    return answer

def main():
    n= int(stdin.readline()) 
    l=[]
    for i in f_range(n):
        x,y=map(int,stdin.readline().split())
        l.append(((x,y),i))
    sol = ''.join(['b' if i == 1 else 'r' for i in FuerzaBruta(l)])
    sol+='\n'
    stdout.write(sol)

            

main()

