#include <bits/stdc++.h>
using namespace std;
int nextInt() {
  int x;
  scanf("%d", &x);
  return x;
}
char buf[11000];
string nextString() {
  scanf("%s", buf);
  return buf;
}
set<vector<int> > used;
int dfs(vector<int> &pos, string &s, vector<int> &id) {
  if (used.find(pos) != used.end()) {
    return 0;
  }
  used.insert(pos);
  int at = pos[0];
  if (s[at] != '?') {
    ++pos[id[s[at]] + 1];
    ++pos[0];
    int res = dfs(pos, s, id);
    --pos[0];
    --pos[id[s[at]] + 1];
    return res;
  }
  int res = 0;
  int mn = s.size() + 100;
  for (int i = 1; i < pos.size(); ++i) {
    mn = min(mn, pos[i]);
  }
  for (int i = 1; i < pos.size(); ++i) {
    if (pos[i] == mn) {
      if (at == s.size() - 1) {
        res |= 1 << (i - 1);
      } else {
        ++pos[i];
        ++pos[0];
        res |= dfs(pos, s, id);
        --pos[0];
        --pos[i];
      }
    }
  }
  return res;
}
int main() {
  int n = nextInt();
  string s = nextString();
  s += '?';
  vector<int> pos(5, 0);
  vector<string> names;
  names.push_back("Gryffindor");
  names.push_back("Hufflepuff");
  names.push_back("Ravenclaw");
  names.push_back("Slytherin");
  vector<int> id(256);
  for (int i = 0; i < names.size(); ++i) {
    id[names[i][0]] = i;
  }
  int res = dfs(pos, s, id);
  for (int i = 0; i < names.size(); ++i) {
    if (res & (1 << i)) {
      cout << names[i] << endl;
    }
  }
  cerr << "|used| = " << used.size() << endl;
  return 0;
}
