#include <bits/stdc++.h>
using ll = long long;
using namespace std;
ll mod = 1e5 + 7;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  ll n, m;
  cin >> n;
  string s;
  cin >> s;
  string s1 = "BGR";
  string s2 = "", s3 = "";
  if (n == 1)
    cout << s << endl;
  else if (n == 2) {
    if (s[0] == s[1]) {
      cout << s[0] << endl;
    } else {
      s1.erase(remove(s1.begin(), s1.end(), s[0]));
      s1.erase(remove(s1.begin(), s1.end(), s[1]));
      cout << s1 << endl;
    }
  } else {
    int p = 0;
    int x = count(s.begin(), s.end(), 'B');
    int y = count(s.begin(), s.end(), 'G');
    int z = count(s.begin(), s.end(), 'R');
    if (x > 0) {
      s2.push_back('B');
    }
    if (x == 0) s3.push_back('B');
    if (y > 0) {
      s2.push_back('G');
    }
    if (y == 0) s3.push_back('G');
    if (z > 0) {
      s2.push_back('R');
    }
    if (z == 0) s3.push_back('R');
    if (s2.size() == 1)
      cout << s2 << endl;
    else if (s2.size() == 3)
      cout << s1 << endl;
    else if (s2.size() == 2) {
      if (x == 1)
        s3.push_back('B');
      else if (y == 1)
        s3.push_back('G');
      else if (z == 1)
        s3.push_back('R');
      else {
        p = 1;
        cout << s1 << endl;
      }
      if (p == 0) {
        if (s3[0] - 48 > s3[1] - 48)
          cout << s3[1] << s3[0] << endl;
        else
          cout << s3 << endl;
      }
    }
  }
}
