#include <bits/stdc++.h>
using namespace std;
int color[3];
int main() {
  int i, mn, n;
  char c;
  string col[] = {"R", "G", "B"}, ans = "";
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> c;
    if (c == 'R')
      color[0]++;
    else if (c == 'G')
      color[1]++;
    else
      color[2]++;
  }
  for (i = 0; i < 3; i++) {
    if (color[i] == n) {
      cout << col[i];
      return 0;
    }
  }
  if (n == 2) {
    if (color[0] == color[1]) cout << col[2];
    if (color[0] == color[2]) cout << col[1];
    if (color[1] == color[2]) cout << col[0];
  } else {
    if (color[0] + color[1] == 1)
      ans = col[0] + col[1];
    else if (color[0] + color[2] == 1)
      ans = col[0] + col[2];
    else if (color[1] + color[2] == 1)
      ans = col[1] + col[2];
    else
      ans = "RGB";
  }
  sort(ans.begin(), ans.end());
  cout << ans;
  return 0;
}
