import sys from operator import itemgetter from collections import defaultdict, deque import heapq from heapq import heapify, heappop, _heapify_max, heappush from bisect import bisect_left, bisect_right import math import itertools import copy stdin=sys.stdin #sys.setrecursionlimit(10 ** 7) #import pypyjit #pypyjit.set_param('max_unroll_recursion=-1') ip=lambda: int(sp()) fp=lambda: float(sp()) lp=lambda:list(map(int,stdin.readline().split())) sp=lambda:stdin.readline().rstrip() Yp=lambda:print('Yes') Np=lambda:print('No') inf = 1 << 60 mod = 10 ** 9 + 7 mod = 998244353 eps = 1e-9 sortkey1 = itemgetter(0) sortkey2 = lambda x: (x[0], x[1]) # sort(key=lambda x:(x[1], x[2])) ############################################################### N, K = lp() A = [-1 for _ in range(N)] for _ in range(K): a, c = input().split() a = int(a) - 1 A[a] = c ans = [] RGB = 'RGB' for i in range(N): if i % 3 == 0: s = 'R' if A[i] == -1 else A[i] ans.append(s) elif i % 3 == 1: s = 'R' if A[i] == -1 else A[i] if ans[-1] == s: for t in RGB: if t != s: s = t break ans.append(s) else: ss = ans[-1] + ans[-2] for t in RGB: if t not in ss: s = t ans.append(s) print(''.join(ans))