#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.length(); i++) {
    if (s[i] == 'R') R++;
    if (s[i] == 'G') G++;
    if (s[i] == 'B') B++;
  }
  if (B and R and G) {
    cout << "BGR";
    return 0;
  }
  if (B and !R and !G) {
    cout << "B";
    return 0;
  }
  if (!B and !R and G) {
    cout << "G";
    return 0;
  }
  if (!B and R and !G) {
    cout << "R";
    return 0;
  }
  if (!G) {
    if (B >= 2 and R >= 2)
      cout << "BGR";
    else if (B >= 2)
      cout << "GR";
    else if (R >= 2)
      cout << "BG";
    else
      cout << "G";
    return 0;
  }
  if (!R) {
    if (B >= 2 and G >= 2)
      cout << "BGR";
    else if (B >= 2)
      cout << "GR";
    else if (G >= 2)
      cout << "BR";
    else
      cout << "R";
    return 0;
  }
  if (!B) {
    if (G >= 2 and R >= 2)
      cout << "BGR";
    else if (G >= 2)
      cout << "BR";
    else if (R >= 2)
      cout << "BG";
    else
      cout << "B";
    return 0;
  }
}
