#include <bits/stdc++.h>
using namespace std;
int dp[201][201][201];
int r = 0, g = 0, b = 0;
int ans = 0;
void dfs(int r, int g, int b) {
  if (r + g + b == 1) {
    ans |= (b << 0);
    ans |= (g << 1);
    ans |= (r << 2);
    return;
  }
  if (r >= 2 && dp[r - 1][g][b] == 0) {
    dp[r - 1][g][b] = 1;
    dfs(r - 1, g, b);
  }
  if (g >= 2 && dp[r][g - 1][b] == 0) {
    dp[r][g - 1][b] = 1;
    dfs(r, g - 1, b);
  }
  if (b >= 2 && dp[r][g][b - 1] == 0) {
    dp[r][g][b - 1] = 1;
    dfs(r, g, b - 1);
  }
  if (r >= 1 && g >= 1 && dp[r - 1][g - 1][b + 1] == 0) {
    dp[r - 1][g - 1][b + 1] = 1;
    dfs(r - 1, g - 1, b + 1);
  }
  if (b >= 1 && g >= 1 && dp[r + 1][g - 1][b - 1] == 0) {
    dp[r + 1][g - 1][b - 1] = 1;
    dfs(r + 1, g - 1, b - 1);
  }
  if (r >= 1 && b >= 1 && dp[r - 1][g + 1][b - 1] == 0) {
    dp[r - 1][g + 1][b - 1] = 1;
    dfs(r - 1, g + 1, b - 1);
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < 201; i++) {
    for (int j = 0; j < 201; j++) {
      for (int k = 0; k < 201; k++) {
        dp[i][j][k] = 0;
      }
    }
  }
  string s;
  cin >> s;
  if (s.length() == 1) {
    cout << s << endl;
    return 0;
  }
  for (int i = 0; i < s.length(); i++) {
    switch (s[i]) {
      case 'R':
        r++;
        break;
      case 'B':
        b++;
        break;
      case 'G':
        g++;
        break;
    }
  }
  dp[r][g][b] = 1;
  dfs(r, g, b);
  string sans = "";
  if ((ans & 1) == 1) {
    sans += "B";
  }
  if ((ans & 2) == 2) {
    sans += "G";
  }
  if ((ans & 4) == 4) {
    sans += "R";
  }
  cout << sans << endl;
  return 0;
}
