#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
char css[4][15] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
long long basv[4] = {1, 10000, 100000000, 1000000000000LL};
int tp[128];
int n;
char ch[10005];
vector<long long> sta, ns;
int dig[4];
int gmask(long long cdat) {
  for (int i = 0; i < (int)(4); i++) {
    dig[i] = cdat % basv[1];
    cdat /= basv[1];
  }
  int cmin = basv[1];
  for (int i = 0; i < (int)(4); i++) cmin = min(cmin, dig[i]);
  int ret = 0;
  for (int i = 0; i < (int)(4); i++)
    if (cmin == dig[i]) ret |= 1 << i;
  return ret;
}
int main() {
  for (int i = 0; i < (int)(4); i++) tp[css[i][0]] = i;
  scanf("%d%s", &n, ch);
  sta.push_back(0);
  for (int i = 0; i < (int)(n); i++)
    if (ch[i] == '?') {
      ns.clear();
      for (int j = 0; j < (int)(sta.size()); j++) {
        int cmask = gmask(sta[j]);
        for (int k = 0; k < (int)(4); k++)
          if (cmask >> k & 1) ns.push_back(sta[j] + basv[k]);
      }
      sort(ns.begin(), ns.end());
      ns.resize(unique(ns.begin(), ns.end()) - ns.begin());
      sta = ns;
    } else
      for (int j = 0; j < (int)(sta.size()); j++) sta[j] += basv[tp[ch[i]]];
  int ret = 0;
  for (int i = 0; i < (int)(sta.size()); i++) ret |= gmask(sta[i]);
  for (int i = 0; i < (int)(4); i++)
    if (ret >> i & 1) printf("%s\n", css[i]);
  return 0;
}
