#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int dx[4] = {0, 0, 1, -1};
const int dy[4] = {1, -1, 0, 0};
int n, a, b, c;
string s;
map<pair<int, pair<int, int> >, int> dic;
bool bo1 = false, bo2 = false, bo3 = false;
void dfs(int a, int b, int c) {
  pair<int, pair<int, int> > temp = make_pair(a, make_pair(b, c));
  if (dic[temp]) return;
  dic[temp] = 1;
  if (a + b + c == 1) {
    if (a == 1) bo1 = true;
    if (b == 1) bo2 = true;
    if (c == 1) bo3 = true;
    return;
  }
  if (a > 0 && b > 0) dfs(a - 1, b - 1, c + 1);
  if (a > 0 && c > 0) dfs(a - 1, b + 1, c - 1);
  if (b > 0 && c > 0) dfs(a + 1, b - 1, c - 1);
  if (a > 1) dfs(a - 1, b, c);
  if (b > 1) dfs(a, b - 1, c);
  if (c > 1) dfs(a, b, c - 1);
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  cin >> s;
  for (int i = 0; i < (int)s.size(); i++) {
    if (s[i] == 'B') a++;
    if (s[i] == 'G') b++;
    if (s[i] == 'R') c++;
  }
  dfs(a, b, c);
  if (bo1) cout << 'B';
  if (bo2) cout << 'G';
  if (bo3) cout << 'R';
  return 0;
}
