import sys input = sys.stdin.readline N,K=map(int,input().split()) D=dict() for i in range(K): x,y=input().split() D[int(x)-1]=y ANS=[""]*(N+10) for i in range(0,N,3): LIST=[] if i in D: LIST.append(D[i]) if i+1 in D: if D[i+1] in LIST: pass else: LIST.append(D[i+1]) if i+2 in D: if D[i+2] in LIST: pass else: LIST.append(D[i+2]) while len(LIST)<3: for k in ["R","G","B"]: if k in LIST: continue else: LIST.append(k) ANS[i]=LIST[0] ANS[i+1]=LIST[1] ANS[i+2]=LIST[2] print("".join(ANS[:N]))