#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y;
  cin >> n;
  char c;
  int b = 0, g = 0, r = 0;
  for (int i = 1; i <= n; i++) {
    cin >> c;
    if (c == 'R') r++;
    if (c == 'B') b++;
    if (c == 'G') g++;
  }
  if (r > 1 && g > 1 || b > 1 && g > 1 || b > 1 && r > 1 ||
      r == 1 && b == 1 && g == 1)
    cout << "BGR";
  else if (b > 0 && g == 0 && r == 0 || b == 0 && r == 1 && g == 1)
    cout << "B";
  else if (r > 0 && g == 0 && b == 0 || b == 1 && g == 1 && r == 0)
    cout << "R";
  else if (g > 0 && b == 0 && r == 0 || g == 0 && b == 1 && r == 1)
    cout << "G";
  else if (b > 1 && g == 1 && r == 0 || b > 1 && g == 0 && r == 1)
    cout << "GR";
  else if (b == 0 && g == 1 && r > 1 || r > 1 && g == 0 && b == 1)
    cout << "BG";
  else if (b == 0 && g > 1 && r == 1 || b == 1 && g > 1 && r == 0)
    cout << "BR";
  else
    cout << "BGR";
}
