#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  string s;
  cin >> s;
  int cntg = count(s.begin(), s.end(), 'G');
  int cntb = count(s.begin(), s.end(), 'B');
  int cntr = count(s.begin(), s.end(), 'R');
  if (cntr and cntb and cntg) {
    cout << "BGR\n";
  } else if (cntr >= 2 and cntg >= 2) {
    cout << "BGR\n";
  } else if (cntr >= 2 and cntb >= 2) {
    cout << "BGR\n";
  } else if (cntg >= 2 and cntb >= 2) {
    cout << "BGR\n";
  } else if (cntr >= 2 and cntb) {
    cout << "BG\n";
  } else if (cntr >= 2 and cntg) {
    cout << "BG\n";
  } else if (cntg >= 2 and cntb) {
    cout << "BR\n";
  } else if (cntg >= 2 and cntr) {
    cout << "BR\n";
  } else if (cntb >= 2 and cntg) {
    cout << "GR\n";
  } else if (cntb >= 2 and cntr) {
    cout << "GR\n";
  } else if (cntr and cntb) {
    cout << "G\n";
  } else if (cntr and cntg) {
    cout << "B\n";
  } else if (cntg and cntb) {
    cout << "R\n";
  } else if (cntr) {
    cout << "R\n";
  } else if (cntg) {
    cout << "G\n";
  } else {
    cout << "B\n";
  }
}
