#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, r = 0, g = 0, b = 0;
  scanf("%d", &n);
  char s[n];
  scanf("%s", &s);
  for (int i = 0; i < n; i++) {
    if (s[i] == 'R') {
      r++;
    }
    if (s[i] == 'G') {
      g++;
    }
    if (s[i] == 'B') {
      b++;
    }
  }
  if (r and g and b) {
    printf("BGR");
    return 0;
  }
  if ((r > 1 and g > 1) or (g > 1 and b > 1) or (b > 1 and r > 1)) {
    printf("BGR");
    return 0;
  }
  if (r == 1 and g == 1) {
    printf("B");
    return 0;
  }
  if (b == 1 and g == 1) {
    printf("R");
    return 0;
  }
  if (r == 1 and b == 1) {
    printf("G");
    return 0;
  }
  if (r > 1 and (g != 0 or b != 0)) {
    printf("BG");
    return 0;
  }
  if (g > 1 and (r != 0 or b != 0)) {
    printf("BR");
    return 0;
  }
  if (b > 1 and (g != 0 or r != 0)) {
    printf("GR");
    return 0;
  }
  if (r) {
    printf("R");
    return 0;
  }
  if (g) {
    printf("G");
    return 0;
  }
  if (b) {
    printf("B");
    return 0;
  }
  return 0;
}
