#include <bits/stdc++.h>
bool debug = false;
using namespace std;
long long convertToNum(string s) {
  long long val = 0;
  for (int i = 0; i < (s.size()); i++) val = val * 10 + s[i] - '0';
  return val;
}
string convertToString(long long a) {
  string res = "";
  if (!a) return "0";
  while (a) {
    res = (char)(a % 10 + 48) + res;
    a /= 10;
  }
  return res;
}
long long GCD(long long x, long long y) {
  if (!x) return y;
  if (!y) return x;
  if (x == y) return x;
  if (x < y)
    return GCD(x, y % x);
  else
    return GCD(x % y, y);
}
long long POW(long long x, long long y, long long Base) {
  if (!y) return 1;
  long long u = POW(x, y / 2, Base);
  u = (u * u) % Base;
  if (y & 1)
    return (u * x) % Base;
  else
    return u;
}
const char firstChar[4] = {'G', 'H', 'R', 'S'};
const string name[4] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
char s[20000];
set<vector<int> > se;
bool res[4];
int pos[300], n;
void check(int index, vector<int> &d) {
  if (index == n) {
    int minval = 1000000009;
    for (int i = 0; i < (4); i++) minval = min(minval, d[i]);
    for (int i = 0; i < (4); i++)
      if (d[i] == minval) res[i] = true;
    return;
  }
  if (se.find(d) != se.end()) return;
  se.insert(d);
  if (s[index] != '?') {
    int minval = 1000000009;
    for (int i = 0; i < (4); i++) minval = min(minval, d[i]);
    d[pos[s[index]]]++;
    check(index + 1, d);
    d[pos[s[index]]]--;
  } else {
    int minval = 1000000009;
    for (int i = 0; i < (4); i++) minval = min(minval, d[i]);
    for (int i = 0; i < (4); i++)
      if (d[i] == minval) {
        d[i]++;
        check(index + 1, d);
        d[i]--;
      }
  }
}
int main() {
  cin >> n;
  gets(s);
  gets(s);
  pos['G'] = 0;
  pos['H'] = 1;
  pos['R'] = 2;
  pos['S'] = 3;
  vector<int> d(4);
  for (int i = 0; i < (4); i++) d[i] = 0;
  check(0, d);
  for (int i = 0; i < (4); i++)
    if (res[i]) cout << name[i] << endl;
  return 0;
}
