#include <bits/stdc++.h>
using namespace std;
int n, ctr, ctg, ctb;
string s;
int main() {
  cin >> n;
  cin >> s;
  for (char a : s) {
    if (a == 'R')
      ctr++;
    else if (a == 'B')
      ctb++;
    else
      ctg++;
  }
  if (ctb == n || (ctg && ctr) || ctb && (ctr > 1 || ctg > 1)) cout << 'B';
  if (ctg == n || (ctb && ctr) || ctg && (ctr > 1 || ctb > 1)) cout << 'G';
  if (ctr == n || (ctb && ctg) || ctr && (ctb > 1 || ctg > 1)) cout << 'R';
  cout << "\n";
}
