#include <bits/stdc++.h>
using namespace std;
class TaskB {
 public:
  void solve(istream& in, ostream& out) {
    int n;
    string s;
    in >> n >> s;
    tuple<int, int, int> cnt{0, 0, 0};
    for (int i = 0; i < n; ++i) {
      if (s[i] == 'B')
        ++get<0>(cnt);
      else if (s[i] == 'G')
        ++get<1>(cnt);
      else if (s[i] == 'R')
        ++get<2>(cnt);
    }
    string res;
    stack<tuple<int, int, int>> st;
    set<tuple<int, int, int>> seen;
    st.push(cnt);
    vector<int> can{0, 0, 0};
    while (!st.empty()) {
      tuple<int, int, int> v = st.top();
      st.pop();
      if (seen.find(v) != seen.end()) {
        continue;
      }
      seen.insert(v);
      if (get<0>(v) + get<1>(v) + get<2>(v) == 1) {
        can[0] = can[0] || get<0>(v);
        can[1] = can[1] || get<1>(v);
        can[2] = can[2] || get<2>(v);
      }
      if (get<0>(v) >= 2)
        st.push(make_tuple(get<0>(v) - 1, get<1>(v), get<2>(v)));
      if (get<1>(v) >= 2)
        st.push(make_tuple(get<0>(v), get<1>(v) - 1, get<2>(v)));
      if (get<2>(v) >= 2)
        st.push(make_tuple(get<0>(v), get<1>(v), get<2>(v) - 1));
      if (get<0>(v) && get<1>(v))
        st.push(make_tuple(get<0>(v) - 1, get<1>(v) - 1, get<2>(v) + 1));
      if (get<0>(v) && get<2>(v))
        st.push(make_tuple(get<0>(v) - 1, get<1>(v) + 1, get<2>(v) - 1));
      if (get<1>(v) && get<2>(v))
        st.push(make_tuple(get<0>(v) + 1, get<1>(v) - 1, get<2>(v) - 1));
    }
    out << (can[0] ? "B" : "") << (can[1] ? "G" : "") << (can[2] ? "R" : "")
        << endl;
  }
};
int main() {
  std::ios::sync_with_stdio(false);
  TaskB solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
