#include using namespace std; using pic = pair; const int N = 1e5 + 10; int n, k; pic a[N]; char ans[N]; int cnt[256]; char minc() { for(char c : {'R', 'G', 'B'}) { bool ok = true; for(char v : {'R', 'G', 'B'}) if(cnt[c] > cnt[v]) { ok = false; break; } if(ok) return c; } return 'r'; } int main() { cin >> n >> k; for(int i = 1; i <= k; i ++) { cin >> a[i].first >> a[i].second; } for(int i = 1; i <= n; i ++) ans[i] = 'R'; sort(a + 1, a + k + 1); for(int i = 1, cur = 1; i <= k; i ++) { auto [x, c] = a[i]; while(cur < x) ans[cur ++] = minc(), cnt[minc()] ++; if(cnt[c] < cnt['R'] || cnt[c] < cnt['G'] || cnt[c] < cnt['B'] || (cnt['R'] == cnt['G'] && cnt['G'] == cnt['B'])) ans[cur ++] = c, cnt[c] ++; else ans[cur ++] = minc(), cnt[minc()] ++; } cout << ans + 1; }