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