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