#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  int n;
  cin >> n >> s;
  int R = 0, G = 0, B = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'R') R++;
    if (s[i] == 'G') G++;
    if (s[i] == 'B') B++;
  }
  string ans;
  if (R > 0 && G > 0 && B > 0) {
    ans += "RGB";
  } else {
    if (R == 0 && G == 0)
      ans += "B";
    else if (R == 0 && B == 0)
      ans += "G";
    else if (B == 0 && G == 0)
      ans += "R";
    else {
      if (R == 0) {
        ans += "R";
        if (B >= 2) ans += "G";
        if (G >= 2) ans += "B";
      } else if (G == 0) {
        ans += "G";
        if (B >= 2) ans += "R";
        if (R >= 2) ans += "B";
      } else if (B == 0) {
        ans += "B";
        if (G >= 2) ans += "R";
        if (R >= 2) ans += "G";
      }
    }
  }
  bool found = false;
  for (int i = 0; i < ans.size(); i++) {
    if (ans[i] == 'B') found = true;
  }
  if (found) cout << "B";
  found = false;
  for (int i = 0; i < ans.size(); i++) {
    if (ans[i] == 'G') found = true;
  }
  if (found) cout << "G";
  found = false;
  for (int i = 0; i < ans.size(); i++) {
    if (ans[i] == 'R') found = true;
  }
  if (found) cout << "R";
}
