#include <bits/stdc++.h>
using namespace std;
set<vector<int> > old, neo;
void GO(vector<int> w, char S) {
  switch (S) {
    case 'G':
      ++w[0];
      neo.insert(w);
      break;
    case 'H':
      ++w[1];
      neo.insert(w);
      break;
    case 'R':
      ++w[2];
      neo.insert(w);
      break;
    case 'S':
      ++w[3];
      neo.insert(w);
      break;
    case '?':
      if (w[0] <= w[1] && w[0] <= w[2] && w[0] <= w[3]) {
        ++w[0];
        neo.insert(w);
        --w[0];
      }
      if (w[1] <= w[0] && w[1] <= w[2] && w[1] <= w[3]) {
        ++w[1];
        neo.insert(w);
        --w[1];
      }
      if (w[2] <= w[0] && w[2] <= w[1] && w[2] <= w[3]) {
        ++w[2];
        neo.insert(w);
        --w[2];
      }
      if (w[3] <= w[0] && w[3] <= w[1] && w[3] <= w[2]) {
        ++w[3];
        neo.insert(w);
        --w[3];
      }
  }
}
set<string> ANS;
int main() {
  int i, j;
  cin >> i;
  string V;
  cin >> V;
  old.insert(vector<int>(4, 0));
  for (i = 0; i < V.size(); ++i) {
    neo.clear();
    for (set<vector<int> >::iterator it = old.begin(); it != old.end(); ++it)
      GO(*it, V[i]);
    old = neo;
  }
  for (set<vector<int> >::iterator it = old.begin(); it != old.end(); ++it) {
    vector<int> w = *it;
    if (w[0] <= w[1] && w[0] <= w[2] && w[0] <= w[3]) ANS.insert("Gryffindor");
    if (w[1] <= w[0] && w[1] <= w[2] && w[1] <= w[3]) ANS.insert("Hufflepuff");
    if (w[2] <= w[0] && w[2] <= w[1] && w[2] <= w[3]) ANS.insert("Ravenclaw");
    if (w[3] <= w[0] && w[3] <= w[1] && w[3] <= w[2]) ANS.insert("Slytherin");
  }
  for (set<string>::iterator it = ANS.begin(); it != ANS.end(); ++it)
    cout << *it << '\n';
  return 0;
}
