#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  cin >> n;
  char arr[n];
  map<char, int> mp, mark;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
    mp[arr[i]]++;
    mark[arr[i]] = 1;
  }
  int c = mark['R'] + mark['B'] + mark['G'];
  switch (c) {
    case 1:
      if (mp['R']) cout << "R";
      if (mp['B']) cout << "B";
      if (mp['G']) cout << "G";
      break;
    case 2:
      if (mp['R'] && mp['B']) {
        if (mp['R'] == 1 && mp['B'] == 1) {
          cout << "G";
          break;
        }
        if (mp['R'] == 1)
          cout << "GR";
        else {
          if (mp['B'] == 1)
            cout << "BG";
          else
            cout << "BGR";
        }
        break;
      }
      if (mp['R'] && mp['G']) {
        if (mp['R'] == 1 && mp['G'] == 1) {
          cout << "B";
          break;
        }
        if (mp['R'] == 1)
          cout << "BR";
        else {
          if (mp['G'] == 1)
            cout << "BG";
          else
            cout << "BGR";
        }
        break;
      }
      if (mp['G'] && mp['B']) {
        if (mp['G'] == 1 && mp['B'] == 1) {
          cout << "R";
          break;
        }
        if (mp['G'] == 1)
          cout << "GR";
        else {
          if (mp['B'] == 1)
            cout << "BR";
          else
            cout << "BGR";
        }
        break;
      }
    case 3:
      cout << "BGR";
  }
  return 0;
}
