#include <bits/stdc++.h>
using namespace std;
int max(int a, int b) { return a > b ? a : b; }
int maxn(int a, int b, int c) { return max(max(a, b), max(b, c)); }
int min(int a, int b) { return a < b ? a : b; }
using namespace std;
int main() {
  int n, num[4], i, j;
  char s[220], s2[4];
  scanf("%d", &n);
  scanf("%s", s);
  memset(num, 0, sizeof(num));
  for (i = 0; i < n; i++) {
    if (s[i] == 'B')
      num[1]++;
    else if (s[i] == 'G')
      num[2]++;
    else if (s[i] == 'R')
      num[3]++;
  }
  int sum = 0;
  for (i = 1; i <= 3; i++) {
    if (!num[i]) sum++;
  }
  s2[1] = 'B';
  s2[2] = 'G';
  s2[3] = 'R';
  if (sum == 2) {
    for (i = 1; i <= 3; i++)
      if (num[i]) printf("%c", s2[i]);
    return 0;
  }
  if (sum == 1) {
    int coun = 0;
    for (i = 1; i <= 3; i++) {
      if (num[i] == 1) coun++;
    }
    if (coun == 2) {
      for (i = 1; i <= 3; i++)
        if (!num[i]) printf("%c", s2[i]);
      return 0;
    }
    if (coun == 1) {
      for (i = 1; i <= 3; i++)
        if (num[i] == 1 || !num[i]) printf("%c", s2[i]);
      return 0;
    }
  }
  printf("BGR");
  return 0;
}
