#include <bits/stdc++.h>
using namespace std;
class State {
 public:
  int log[4];
  bool operator<(State sb) const {
    for (int i = 0; i < 4; i++)
      if (log[i] != sb.log[i]) return log[i] < sb.log[i];
    return false;
  }
  void init() { fill(log, log + 4, 0); }
};
char name[][20] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
set<State> s;
bool ans[4];
State st;
int n;
char str[10010];
void dfs(int pos) {
  if (s.find(st) != s.end())
    return;
  else
    s.insert(st);
  int tmin = min(min(st.log[0], st.log[1]), min(st.log[2], st.log[3]));
  if (pos == n) {
    for (int i = 0; i < 4; i++)
      if (st.log[i] == tmin) ans[i] = true;
    return;
  }
  if (str[pos] == '?') {
    for (int i = 0; i < 4; i++)
      if (st.log[i] == tmin) {
        st.log[i]++;
        dfs(pos + 1);
        st.log[i]--;
      }
  } else {
    for (int i = 0; i < 4; i++)
      if (str[pos] == name[i][0]) {
        st.log[i]++;
        dfs(pos + 1);
        st.log[i]--;
        break;
      }
  }
}
int main() {
  scanf("%d%s", &n, str);
  st.init();
  dfs(0);
  for (int i = 0; i < 4; i++)
    if (ans[i]) puts(name[i]);
  return 0;
}
