#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64000000")
int n;
string s;
int a[1 << 15];
int b[4];
string names[4] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
inline int value(char c) {
  for (int i = 0; i < 4; ++i) {
    if (names[i][0] == c) return i;
  }
  return -1;
}
inline void init() {
  cin >> n;
  cin >> s;
  for (int i = 0; i < n; ++i) {
    a[i] = value(s[i]);
    if (a[i] == -1) continue;
    ++b[a[i]];
  }
}
int prior[4];
int can[4];
int cnt[4];
int main() {
  init();
  memset(can, 0, sizeof can);
  for (int i = 0; i < 4; ++i) prior[i] = i;
  do {
    memset(cnt, 0, sizeof cnt);
    for (int i = 0; i < n; ++i) {
      if (a[i] != -1) {
        ++cnt[a[i]];
        continue;
      }
      int mn = cnt[0];
      for (int t = 1; t < 4; ++t) {
        mn = min(mn, cnt[t]);
      }
      for (int t = 0; t < 4; ++t) {
        int x = prior[t];
        if (cnt[x] != mn) continue;
        ++cnt[x];
        break;
      }
    }
    int mn = cnt[0];
    for (int t = 0; t < 4; ++t) {
      mn = min(mn, cnt[t]);
    }
    for (int t = 0; t < 4; ++t)
      if (cnt[t] == mn) can[t] = 1;
  } while (next_permutation(prior, prior + 4));
  for (int t = 0; t < 4; ++t)
    if (can[t]) cout << names[t] << endl;
  return 0;
}
