#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  string s;
  cin >> s;
  sort(s.begin(), s.end());
  long long count1 = 0, count2 = 0, count3 = 0;
  for (long long i = 0; i < n; i++) {
    if (s[i] == 'R')
      count3++;
    else if (s[i] == 'G')
      count2++;
    else
      count1++;
  }
  if (count1 && !count2 && !count3)
    cout << "B" << endl;
  else if (!count1 && count2 && !count3)
    cout << "G" << endl;
  else if (!count1 && !count2 && count3)
    cout << "R" << endl;
  else if (count1 && count2 && count3) {
    cout << "BGR" << endl;
    return 0;
  } else if (!count1) {
    if (count2 == 1 && count3 == 1)
      cout << "B" << endl;
    else if (count2 == 1 && count3 > 1)
      cout << "BG" << endl;
    else if (count2 > 1 && count3 == 1)
      cout << "BR" << endl;
    else
      cout << "BGR" << endl;
  } else if (!count2) {
    if (count1 == 1 && count3 == 1)
      cout << "G" << endl;
    else if (count1 == 1 && count3 > 1)
      cout << "BG" << endl;
    else if (count1 > 1 && count3 == 1)
      cout << "GR" << endl;
    else
      cout << "BGR" << endl;
  } else if (!count3) {
    if (count2 == 1 && count1 == 1)
      cout << "R" << endl;
    else if (count2 == 1 && count1 > 1)
      cout << "GR" << endl;
    else if (count2 > 1 && count1 == 1)
      cout << "BR" << endl;
    else
      cout << "BGR" << endl;
  }
}
