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