#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 10 * 1000 + 10;
set<vector<int> > s[MAX_N];
int n;
string in, ff = "GHRS",
           out[4] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
bool can[5];
void read_input() {
  cin >> n;
  cin >> in;
}
void solve() {
  in = '?' + in;
  for (int i = 1; i <= n; i++) {
    int andis = -1;
    for (int j = 0; j < 4; j++)
      if (in[i] == ff[j]) andis = j;
    in[i] = andis;
  }
  vector<int> tmp;
  for (int i = 0; i < 4; i++) tmp.push_back(0);
  s[0].insert(tmp);
  for (int i = 1; i <= n; i++) {
    for (set<vector<int> >::iterator j = s[i - 1].begin(); j != s[i - 1].end();
         j++) {
      tmp = *j;
      if (in[i] == -1) {
        int mini = *min_element(tmp.begin(), tmp.end());
        for (int k = 0; k < (int)tmp.size(); k++)
          if (tmp[k] == mini) {
            tmp[k]++;
            s[i].insert(tmp);
            tmp[k]--;
          }
      } else {
        tmp[in[i]]++;
        s[i].insert(tmp);
      }
    }
  }
  for (set<vector<int> >::iterator j = s[n].begin(); j != s[n].end(); j++) {
    tmp = *j;
    int mini = *min_element(tmp.begin(), tmp.end());
    for (int k = 0; k < (int)tmp.size(); k++)
      if (tmp[k] == mini) can[k] = true;
  }
}
void write_output() {
  for (int i = 0; i < 4; i++)
    if (can[i]) cout << out[i] << endl;
}
int main() {
  ios::sync_with_stdio(false);
  read_input();
  solve();
  write_output();
  return 0;
}
