#include <bits/stdc++.h>
using namespace std;
template <class T>
void show(const vector<T> &a) {
  for (T x : a) cout << x << " ";
  cout << '\n';
}
vector<long long> xx = {1, 0, -1, 0};
vector<long long> yy = {0, 1, 0, -1};
string dir = "LRUD";
const long long N = 1e5 + 50, oo = 9e18 + 500;
const long long mod = 998244353;
const long double eps = 1e-7, PI = 2 * acos(0.0);
long long n, m, k;
long long cnt = 0;
long long lg = 18;
vector<long long> g[N];
vector<long long> visit(N, 0);
signed main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  cin >> n;
  string s;
  cin >> s;
  map<char, long long> mp;
  for (auto c : s) {
    mp[c]++;
  }
  if (((long long)(mp.size())) == 1) {
    return cout << (*mp.begin()).first, 0;
  }
  if (((long long)(mp.size())) == 3) {
    return cout << "BGR", 0;
  }
  for (auto pr : mp) {
    if (pr.second > 1) {
      cnt++;
    }
  }
  if (cnt == 0) {
    if (!mp.count('R')) {
      return cout << "R", 0;
    }
    if (!mp.count('B')) {
      return cout << "B", 0;
    }
    if (!mp.count('G')) {
      return cout << "G", 0;
    }
  }
  if (cnt == 2) {
    return cout << "BGR", 0;
  }
  if (mp.count('R') && mp['R'] > 1) {
    return cout << "BG", 0;
  }
  if (mp.count('G') && mp['G'] > 1) {
    return cout << "BR", 0;
  }
  if (mp.count('B') && mp['B'] > 1) {
    return cout << "GR", 0;
  }
}
