#include <bits/stdc++.h>
using namespace std;
const int OO = (int)2e9;
const int MOD = (int)1e9 + 7;
const long double Pi = 3.1415926535897932384;
const int N = (int)5e2 + 5;
int cnt[4], n;
bool ok[N];
char s[N];
int main() {
  cin >> n;
  cin >> (s + 1);
  for (int i = (int)(1); i <= (int)(n); i++) {
    if (s[i] == 'R') cnt[1]++;
    if (s[i] == 'G') cnt[2]++;
    if (s[i] == 'B') cnt[3]++;
  }
  memset(ok, false, sizeof(ok));
  ok[1] = (cnt[2] && cnt[3]) || (cnt[2] == 0 && cnt[3] == 0);
  ok[2] = (cnt[1] && cnt[3]) || (cnt[1] == 0 && cnt[3] == 0);
  ok[3] = (cnt[1] && cnt[2]) || (cnt[1] == 0 && cnt[2] == 0);
  ok[1] |= (cnt[1] && (cnt[2] > 1 || cnt[3] > 1));
  ok[2] |= (cnt[2] && (cnt[1] > 1 || cnt[3] > 1));
  ok[3] |= (cnt[3] && (cnt[1] > 1 || cnt[2] > 1));
  if (ok[3]) cout << "B";
  if (ok[2]) cout << "G";
  if (ok[1]) cout << "R";
}
