#include <bits/stdc++.h>
using namespace std;
struct p {
  int count[4];
  bool operator<(p b) const {
    for (int i = 0; i < 4; i++)
      if (count[i] > b.count[i])
        return false;
      else if (count[i] < b.count[i])
        return true;
    return false;
  }
  p() { count[0] = count[1] = count[2] = count[3] = 0; }
  int sum() { return count[0] + count[1] + count[2] + count[3]; }
  vector<bool> possible() {
    int min = count[0];
    for (int i = 1; i < 4; i++)
      if (count[i] < min) min = count[i];
    vector<bool> answ(4, false);
    for (int i = 0; i < 4; i++)
      if (count[i] == min) answ[i] = true;
    return answ;
  }
};
int main() {
  int n;
  string str;
  cin >> n >> str;
  queue<p> q;
  set<p> s;
  q.push(p());
  s.insert(p());
  for (int i = 0; i < n; i++) {
    while (!q.empty() && q.front().sum() == i) {
      p cur = q.front();
      q.pop();
      s.erase(cur);
      if (str[i] == '?') {
        vector<bool> possible = cur.possible();
        for (int j = 0; j < 4; j++)
          if (possible[j]) {
            p temp = cur;
            temp.count[j]++;
            if (s.find(temp) != s.end()) continue;
            s.insert(temp);
            q.push(temp);
          }
      } else {
        int j;
        switch (str[i]) {
          case 'G':
            j = 0;
            break;
          case 'H':
            j = 1;
            break;
          case 'R':
            j = 2;
            break;
          case 'S':
            j = 3;
            break;
        }
        p temp = cur;
        temp.count[j]++;
        s.insert(temp);
        q.push(temp);
      }
    }
  }
  vector<bool> ans(4, false);
  while (!q.empty()) {
    p temp = q.front();
    q.pop();
    vector<bool> possible = temp.possible();
    for (int i = 0; i < 4; i++) ans[i] = ans[i] || possible[i];
  }
  if (ans[0]) cout << "Gryffindor" << endl;
  if (ans[1]) cout << "Hufflepuff" << endl;
  if (ans[2]) cout << "Ravenclaw" << endl;
  if (ans[3]) cout << "Slytherin" << endl;
  return 0;
}
