#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int Blue = 0, Green = 0, Red = 0;
  vector<char> vt(n);
  for (int i = 0; i < n; ++i) {
    char ch;
    cin >> ch;
    if (ch == 'R')
      ++Red;
    else if (ch == 'G')
      ++Green;
    else if (ch == 'B')
      ++Blue;
    vt.push_back(ch);
  }
  if (((Red > 0) && (Blue > 0) && (Green > 0)) ||
      ((Red == 0) && (Blue >= 2) && (Green >= 2)) ||
      ((Red >= 2) && (Blue == 0) && (Green >= 2)) ||
      ((Red >= 2) && (Blue >= 2) && (Green == 0))) {
    cout << "BGR" << endl;
  } else if (Red == 0) {
    if ((Blue >= 2) && (Green > 0))
      cout << "GR" << endl;
    else if ((Blue > 0) && (Green >= 2))
      cout << "BR" << endl;
    else if ((Blue > 0) && (Green > 0))
      cout << "R" << endl;
    else if ((Blue == 0) && (Green > 0))
      cout << "G" << endl;
    else if ((Blue > 0) && (Green == 0))
      cout << "B" << endl;
  } else if (Blue == 0) {
    if ((Red >= 2) && (Green > 0))
      cout << "BG" << endl;
    else if ((Red > 0) && (Green >= 2))
      cout << "BR" << endl;
    else if ((Red > 0) && (Green > 0))
      cout << "B" << endl;
    else if ((Red > 0) && (Green == 0))
      cout << "R" << endl;
  } else if (Green == 0) {
    if ((Red >= 2) && (Blue > 0))
      cout << "BG" << endl;
    else if ((Red > 0) && (Blue >= 2))
      cout << "GR" << endl;
    else if ((Red > 0) && (Blue > 0))
      cout << "G" << endl;
  }
  return 0;
}
