#include <bits/stdc++.h>
using namespace std;
int n;
string s;
int f[3];
int yep[3];
int vis[303][303][303];
void solve(int b, int g, int r) {
  if (b + g + r == 1) {
    if (b == 1) yep[0] = 1;
    if (g == 1) yep[1] = 1;
    if (r == 1) yep[2] = 1;
  }
  if (vis[b][g][r]) return;
  vis[b][g][r] = 1;
  if (b >= 2) solve(b - 1, g, r);
  if (g >= 2) solve(b, g - 1, r);
  if (r >= 2) solve(b, g, r - 1);
  if (b && g) solve(b - 1, g - 1, r + 1);
  if (b && r) solve(b - 1, g + 1, r - 1);
  if (g && r) solve(b + 1, g - 1, r - 1);
}
int main() {
  cin >> n >> s;
  for (int i = (int)0; i < (int)n; i++) {
    if (s[i] == 'B') f[0]++;
    if (s[i] == 'G') f[1]++;
    if (s[i] == 'R') f[2]++;
  }
  solve(f[0], f[1], f[2]);
  if (yep[0]) cout << 'B';
  if (yep[1]) cout << 'G';
  if (yep[2]) cout << 'R';
  puts("");
  return 0;
}
