#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using dd = long double;
namespace {
static bool constexpr dbg = 0;
ll constexpr N = 210;
ll n, nr, ng, nb;
string s;
void init() { cin >> n >> s; }
void solve() {
  if (n == count(s.begin(), s.end(), s[0]))
    cout << s[0];
  else {
    for (char c : {'B', 'G', 'R'})
      if (count(s.begin(), s.end(), c) != n - 1) cout << c;
  }
}
void test() {
  if (dbg) {
  }
}
}  // namespace
int main() {
  if (!dbg) {
    std::ios::sync_with_stdio(false);
    cin.tie(nullptr);
  }
  cout << fixed << setprecision(20);
  init();
  solve();
  test();
  return 0;
}
