#include <bits/stdc++.h>
using namespace std;
const int N = 20000;
set<vector<int> > s[N];
string deps[] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
string dd = "GHRS";
int main() {
  int n;
  cin >> n;
  s[0].insert(vector<int>(4, 0));
  string t;
  cin >> t;
  set<int> types;
  n++;
  t += "?";
  for (int i = 1; i <= n; i++) {
    string f = "";
    f += t[i - 1];
    types.clear();
    const set<vector<int> >& ss = s[i - 1];
    int type = (dd.find(f) != string::npos ? dd.find(f) : -1);
    for (set<vector<int> >::iterator it = ss.begin(); it != ss.end(); it++) {
      if (type != -1) {
        vector<int> next(*it);
        next[type]++;
        s[i].insert(next);
        types.insert(type);
      } else {
        int minv = *min_element(it->begin(), it->end());
        for (int j = 0; j < int(it->size()); j++)
          if ((*it)[j] == minv) {
            vector<int> next(*it);
            next[j]++;
            s[i].insert(next);
            types.insert(j);
          }
      }
    }
  }
  for (set<int>::iterator i = types.begin(); i != types.end(); i++)
    cout << deps[*i] << endl;
  return 0;
}
