#include <bits/stdc++.h>
using namespace std;
string f[4] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
char a[10020];
int n;
int now[4];
long long ten[4];
bool can[4];
set<long long> m;
void go(int l, long long hash) {
  if (m.count(hash)) return;
  m.insert(hash);
  if (l == n) {
    int mn = 1 << 30;
    for (int i = 0; i < (int)4; ++i) mn = min(mn, now[i]);
    for (int i = 0; i < (int)4; ++i) can[i] |= now[i] == mn;
    return;
  }
  if (a[l] == '?') {
    int mn = 1 << 30;
    for (int i = 0; i < (int)4; ++i) mn = min(mn, now[i]);
    for (int i = 0; i < (int)4; ++i)
      if (now[i] == mn) {
        now[i]++;
        go(l + 1, hash + ten[i]);
        now[i]--;
      }
  } else {
    for (int i = 0; i < (int)4; ++i)
      if (f[i][0] == a[l]) now[i]++, hash += ten[i];
    go(l + 1, hash);
    for (int i = 0; i < (int)4; ++i)
      if (f[i][0] == a[l]) now[i]--, hash -= ten[i];
  }
}
int main() {
  scanf("%d %s", &n, a);
  ten[0] = 1;
  for (int i = 0; i < (int)3; ++i) ten[i + 1] = ten[i] * 10000;
  m.clear();
  go(0, 0);
  for (int i = 0; i < (int)4; ++i)
    if (can[i]) cout << f[i] << endl;
  return 0;
}
