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