#include <bits/stdc++.h>
using namespace std;
struct Cart {
  int cnt;
  char let;
  Cart() { this->cnt = 0; }
  Cart(int cnt, int let) {
    this->cnt = cnt;
    this->let = let;
  }
};
Cart a[3];
int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  a[0].let = 'R';
  a[1].let = 'G';
  a[2].let = 'B';
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == 'R') a[0].cnt++;
    if (s[i] == 'G') a[1].cnt++;
    if (s[i] == 'B') a[2].cnt++;
  }
  if (a[0].cnt && a[1].cnt && a[2].cnt) {
    cout << "BGR";
    return 0;
  }
  int good = 0, bad = 0, norm = 0;
  for (int i = 0; i < 3; i++) {
    if (a[i].cnt >= 2) good++;
    if (a[i].cnt == 1) norm++;
    if (a[i].cnt == 0) bad++;
  }
  if (good >= 2) {
    cout << "BGR";
    return 0;
  }
  if (bad >= 2) {
    for (int i = 0; i < 3; i++)
      if (a[i].cnt > 0) cout << a[i].let;
    return 0;
  }
  char k, ans, ans2;
  if (norm == 2) {
    for (int i = 0; i < 3; i++) {
      if (a[i].cnt == 0) cout << a[i].let;
    }
    return 0;
  }
  for (int i = 0; i < 3; i++) {
    if (a[i].cnt >= 2) k = a[i].let;
    if (a[i].cnt == 1) ans = a[i].let;
  }
  for (int i = 0; i < 3; i++) {
    if (a[i].let != k && a[i].let != ans) ans2 = a[i].let;
  }
  ans < ans2 ? cout << ans << ans2 : cout << ans2 << ans;
  return 0;
}
