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.
from sys import stdin, stdout
from collections import defaultdict

time = 0
c = 2*10**5
n = 4*10**5+2
col = 0

finished= [0]*n
for_node = [0]*n

f_range=range
f_len=len

def dfs_euler_tour(node: int, graph):

    stack = []
    global colour
    global col
    global time

    stack.append((node, -1))
    while stack:
        s, ind = stack.pop()
        if ind > -1:
            if ind < f_len(colour):
                colour[ind] = col
            col = col ^ 1

        index = for_node[s]
        while(index < f_len(graph[s])):
            v,i=graph[s][index]
            if not visited[i]:
                stack.append((v, i))
                visited[i] = True
                index += 1
                for_node[s] = index
                break
            index += 1
        finished[s]+1

m = int(stdin.readline())
graph =defaultdict(list)
edges=[]
debug=[]
for i in f_range(m):
    u, v = stdin.readline().split()
    u, v = (int(u)-1, int(v)-1 + c+1)
    edges.append((u, v))
    graph[u].append((v, i))
    graph[v].append((u, i))
    if u == 30630-1 and m == 199809:
        debug.append(i)
colour = [-1]*m

odds= [i for i in graph.keys() if f_len(graph[i]) % 2]

if odds:
    for i in f_range(f_len(odds)):
        u = odds[i]
        ind=f_len(edges)
        if u<c:
            v = n-1
        else:
            v = c
        edges.append((u, v))
        graph[u].append((v, ind))
        graph[v].append((u, ind))
    
    if f_len(graph[n-1]) % 2:
        u=n-1
        v=c
        ind = f_len(edges)
        edges.append((u, v))
        graph[u].append((v, ind))
        graph[v].append((u, ind))

visited = [False]*f_len(edges)

for i in graph.keys():
    if not finished[i]:
        dfs_euler_tour(i, graph)

sol = ''.join(['b' if i == 1 else 'r' for i in colour])
sol += '\n'
stdout.write(sol)