#include <bits/stdc++.h>
using namespace std;
int main() {
  string c;
  long long u;
  cin >> u;
  long long r = 0, g = 0, b = 0;
  bool r1 = 0, g1 = 0, b1 = 0;
  cin >> c;
  for (long long y = 0; y < c.size(); y++) {
    if (c[y] == 'B') b++, b1 = 1;
    if (c[y] == 'R') r++, r1 = 1;
    if (c[y] == 'G') g++, g1 = 1;
  }
  if (b1 + g1 + r1 == 3)
    cout << "BGR";
  else {
    if (b1 + g1 + r1 == 1) {
      if (b1 == 1) cout << "B";
      if (g1 == 1) cout << "G";
      if (r1 == 1) cout << "R";
    } else {
      if (b == 0) {
        if (g > 1 && r > 1)
          cout << "BGR";
        else if (g == 1 && r == 1)
          cout << "B";
        else if (g > 1 && r == 1)
          cout << "BR";
        else if (g == 1 && r > 1)
          cout << "BG";
      }
      if (g == 0) {
        if (b > 1 && r > 1)
          cout << "BGR";
        else if (b == 1 && r == 1)
          cout << "G";
        else if (b > 1 && r == 1)
          cout << "GR";
        else if (b == 1 && r > 1)
          cout << "BG";
      }
      if (r == 0) {
        if (g > 1 && b > 1)
          cout << "BGR";
        else if (g == 1 && b == 1)
          cout << "R";
        else if (g > 1 && b == 1)
          cout << "BR";
        else if (g == 1 && b > 1)
          cout << "GR";
      }
    }
  }
}
