#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
long long INF = 1e18;
long long mod = 1e8;
bool dp[201][201][201] = {0};
void rec(int r, int g, int b) {
  if (r == 0 && g == 0 && b == 0) return;
  if (!dp[r][g][b]) {
    if (r >= 0 && g >= 0 && b >= 0) dp[r][g][b] = true;
    if (r > 1) rec(r - 1, g, b);
    if (g > 1) rec(r, g - 1, b);
    if (b > 1) rec(r, g, b - 1);
    if (r > 0 && b > 0) rec(r - 1, g + 1, b - 1);
    if (g > 0 && b > 0) rec(r + 1, g - 1, b - 1);
    if (r > 0 && g > 0) rec(r - 1, g - 1, b + 1);
  }
}
void solve() {
  int n, r, g, b, i, j, k, m;
  r = g = b = 0;
  cin >> n;
  string str;
  cin >> str;
  memset(dp, false, sizeof dp);
  for (int i = 0; i < n; i++) {
    if (str[i] == 'R')
      r++;
    else if (str[i] == 'G')
      g++;
    else
      b++;
  }
  rec(r, g, b);
  if (dp[0][0][1]) cout << "B";
  if (dp[0][1][0]) cout << "G";
  if (dp[1][0][0]) cout << "R";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  solve();
}
