#include <bits/stdc++.h>
using namespace std;
set<vector<int> > S[2];
int n;
int main() {
  scanf("%d ", &n);
  int now = 1, suc = 0, debug = 0;
  vector<int> tmp(4, 0);
  S[suc].insert(tmp);
  while (n--) {
    swap(now, suc);
    S[suc].clear();
    int c = getchar();
    c = c == '?' ? 4 : (c == 'G' ? 0 : (c == 'H' ? 1 : (c == 'R' ? 2 : 3)));
    for (set<vector<int> >::iterator e = S[now].begin(); e != S[now].end();
         ++e) {
      tmp = *e;
      if (c < 4) {
        tmp[c]++;
        S[suc].insert(tmp);
      } else {
        int Min = *min_element(tmp.begin(), tmp.end());
        for (int i = 0; i < 4; ++i)
          if (tmp[i] == Min) {
            ++tmp[i];
            S[suc].insert(tmp);
            --tmp[i];
          }
      }
    }
  }
  string ans[4] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
  for (int i = 0; i < 4; ++i)
    for (set<vector<int> >::iterator e = S[suc].begin(); e != S[suc].end(); ++e)
      if ((*e)[i] == *min_element(e->begin(), e->end())) {
        puts(ans[i].c_str());
        break;
      }
}
