#include <bits/stdc++.h>
using namespace std;
const long long MAX = 3e5 + 10;
const long long INF = 1e18;
const long long M = 1e6 + 10;
int main() {
  int n, i, j, k, l, p, q;
  string s;
  cin >> n >> s;
  set<char> a;
  char st[3] = {'R', 'G', 'B'};
  for (i = 0; i < n; i++) a.insert(s[i]);
  if (a.size() == 1) {
    cout << *a.begin();
    return 0;
  }
  if (n == 2) {
    if (s[i] == s[i + 1])
      cout << s[i];
    else {
      for (i = 0; i < 3; i++) {
        if (a.find(st[i]) == a.end()) cout << st[i];
      }
    }
  } else {
    if (a.size() == 3)
      cout << "BGR";
    else {
      char ch;
      string s2 = "";
      for (i = 0; i < 3; i++) {
        if (a.find(st[i]) == a.end()) ch = st[i];
      }
      for (i = 0; i < 3; i++) {
        l = 0;
        for (j = 0; j < n; j++) {
          if (s[j] == st[i]) l++;
        }
        if (l == 1) {
          s2 += ch;
          s2 += st[i];
          sort(s2.begin(), s2.end());
          cout << s2;
          break;
        }
      }
      if (l != 1) cout << "BGR";
    }
  }
}
