#include <bits/stdc++.h>
using namespace std;
int color[3];
char str[3] = {'R', 'G', 'B'};
string answer = "";
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    char ch;
    cin >> ch;
    if (ch == 'R')
      color[0]++;
    else if (ch == 'G')
      color[1]++;
    else
      color[2]++;
  }
  int cnt = 0;
  for (int i = 0; i < 3; i++) {
    if (color[i] > 0) {
      cnt++;
    }
  }
  if (cnt == 3) {
    answer = "BRG";
    sort(answer.begin(), answer.end());
    cout << answer;
    return 0;
  }
  if (cnt == 1) {
    for (int i = 0; i < 3; i++) {
      if (color[i] > 0) cout << str[i] << endl;
    }
    return 0;
  }
  int ind;
  for (int i = 0; i < 3; i++) {
    if (color[i] == 0) {
      ind = i;
      answer += str[i];
    }
  }
  for (int i = 0; i < 3; i++) {
    if (color[i] > 1) {
      answer += str[3 - ind - i];
    }
  }
  sort(answer.begin(), answer.end());
  cout << answer << endl;
  return 0;
}
