#include <bits/stdc++.h>
using namespace std;
bool f[201][201][201];
bool checkb = false, checkg = false, checkr = false;
void dp(int b, int g, int r) {
  if (b < 0 || g < 0 || r < 0) return;
  if (f[b][g][r]) return;
  if (b + r + g == 1) {
    if (b)
      checkb = true;
    else if (g)
      checkg = true;
    else
      checkr = true;
  }
  dp(b - 1, g - 1, r + 1);
  dp(b - 1, g + 1, r - 1);
  dp(b + 1, g - 1, r - 1);
  if (r >= 2) dp(b, g, r - 1);
  if (b >= 2) dp(b - 1, g, r);
  if (g >= 2) dp(b, g - 1, r);
  return;
}
int main() {
  memset(f, false, sizeof(f));
  int n, b, g, r;
  string card;
  cin >> n >> card;
  b = g = r = 0;
  for (int i = 0; i < n; i++) {
    if (card[i] == 'B')
      b++;
    else if (card[i] == 'G')
      g++;
    else
      r++;
  }
  if (b && g && r) {
    cout << "BGR";
  } else if (b && g) {
    if (min(b, g) >= 2)
      cout << "BGR";
    else {
      if (b == 1 && g == 1)
        cout << "R";
      else if (b == 1)
        cout << "BR";
      else
        cout << "GR";
    }
  } else if (b && r) {
    if (min(b, r) >= 2)
      cout << "BGR";
    else {
      if (b == 1 && r == 1)
        cout << "G";
      else if (b == 1)
        cout << "BG";
      else
        cout << "GR";
    }
  } else if (g && r) {
    if (min(r, g) >= 2)
      cout << "BGR";
    else {
      if (r == 1 && g == 1)
        cout << "B";
      else if (r == 1)
        cout << "BR";
      else
        cout << "BG";
    }
  } else if (b)
    cout << "B";
  else if (g)
    cout << "G";
  else
    cout << "R";
}
