#include <bits/stdc++.h>
using namespace std;
inline long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
long long mypow(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 1ll;
  long long _tmp = mypow(_a, _x / 2, _mod);
  _tmp = (_tmp * _tmp) % _mod;
  if (_x & 1) _tmp = (_tmp * _a) % _mod;
  return _tmp;
}
inline long long add(long long _x, long long _y,
                     long long _mod = 1000000007ll) {
  long long _ = _x + _y;
  if (_ >= _mod) _ -= _mod;
  return _;
}
inline long long sub(long long _x, long long _y,
                     long long _mod = 1000000007ll) {
  long long _ = _x - _y;
  if (_ < 0) _ += _mod;
  return _;
}
inline long long mul(long long _x, long long _y,
                     long long _mod = 1000000007ll) {
  long long _ = _x * _y;
  if (_ >= _mod) _ %= _mod;
  return _;
}
inline bool equal(double _x, double _y) {
  return _x > _y - 1e-9 && _x < _y + 1e-9;
}
int __ = 1, _cs;
void build() {}
int n;
char c[222];
inline int trans(char ctmp) {
  if (ctmp == 'B') return 0;
  if (ctmp == 'G') return 1;
  if (ctmp == 'R') return 2;
  return -1;
}
int cnt[222], len;
void init() {
  n = getint();
  scanf("%s", c);
  len = strlen(c);
  for (int i = 0; i < len; i++) cnt[trans(c[i])]++;
}
char aa[9] = "BGR";
bool got[222 + 2][222 + 2][222 + 2];
void solve() {
  got[cnt[0]][cnt[1]][cnt[2]] = true;
  for (int _ = 222 + 222; _ >= 0; _--)
    for (int i = min(222, _); i >= 0; i--)
      for (int j = min(222, _ - i); j >= 0; j--) {
        int k = _ - i - j;
        if (k < 0 || k >= 222) continue;
        if (!got[i][j][k]) continue;
        if (i && j) got[i - 1][j - 1][k + 1] = true;
        if (i && k) got[i - 1][j + 1][k - 1] = true;
        if (j && k) got[i + 1][j - 1][k - 1] = true;
        if (i > 1) got[i - 1][j][k] = true;
        if (j > 1) got[i][j - 1][k] = true;
        if (k > 1) got[i][j][k - 1] = true;
      }
  if (got[1][0][0]) putchar('B');
  if (got[0][1][0]) putchar('G');
  if (got[0][0][1]) putchar('R');
  puts("");
}
int main() {
  build();
  while (__--) {
    init();
    solve();
  }
}
