#include <bits/stdc++.h>
using namespace std;
class VentureCup {
 public:
  void ProblemA();
};
void VentureCup::ProblemA() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  int cb = 0, cg = 0, cr = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'B') cb++;
    if (s[i] == 'G') cg++;
    if (s[i] == 'R') cr++;
  }
  if (cr >= 1 && cg >= 1 && cb >= 1)
    cout << "BGR";
  else if (!cr && !cb)
    cout << "G";
  else if (!cr && !cg)
    cout << "B";
  else if (!cg && !cb)
    cout << "R";
  else {
    if (!cr) {
      if (cg == 1 && cb >= 2)
        cout << "GR";
      else if (cb == 1 && cg >= 2)
        cout << "BR";
      else if (cb >= 2 && cg >= 2)
        cout << "BGR";
      else if (cb == 1 && cg == 1)
        cout << "R";
    } else if (!cg) {
      if (cr == 1 && cb >= 2)
        cout << "GR";
      else if (cb == 1 && cr >= 2)
        cout << "BG";
      else if (cb >= 2 && cr >= 2)
        cout << "BGR";
      else if (cb == 1 && cr == 1)
        cout << "G";
    } else if (!cb) {
      if (cg == 1 && cr >= 2)
        cout << "BG";
      else if (cr == 1 && cg >= 2)
        cout << "BR";
      else if (cr >= 2 && cg >= 2)
        cout << "BGR";
      else if (cr == 1 && cg == 1)
        cout << "B";
    }
  }
}
int main() {
  VentureCup t;
  t.ProblemA();
  return 0;
}
