#include <bits/stdc++.h>
using namespace std;
int getIdx(char c) {
  if (c == 'G') return 0;
  if (c == 'H') return 1;
  if (c == 'R') return 2;
  return 3;
}
int main() {
  int n;
  int cnt[4];
  bool ok[4];
  string name[4] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
  while (cin >> n) {
    string str;
    cin >> str;
    set<long long> cur, next;
    cur.insert(0);
    for (int i = 0; i < n; i++) {
      next.clear();
      for (set<long long>::iterator it = cur.begin(); it != cur.end(); it++) {
        long long l = *it;
        for (int j = 0; j < 3; j++) {
          cnt[j] = l % (1 << 16);
          l /= (1 << 16);
        }
        cnt[3] = i - (cnt[0] + cnt[1] + cnt[2]);
        if (str[i] == '?') {
          int m = 99999999;
          for (int j = 0; j < 4; j++) m = min(m, cnt[j]);
          for (int j = 0; j < 4; j++) {
            if (cnt[j] == m) {
              if (j == 3)
                next.insert(*it);
              else
                next.insert(*it + (1LL << (16 * j)));
            }
          }
        } else {
          int idx = getIdx(str[i]);
          if (idx == 3)
            next.insert(*it);
          else
            next.insert(*it + (1LL << (16 * idx)));
        }
      }
      cur = next;
    }
    memset(ok, false, sizeof(ok));
    for (set<long long>::iterator it = cur.begin(); it != cur.end(); it++) {
      long long l = *it;
      for (int j = 0; j < 3; j++) {
        cnt[j] = l % (1 << 16);
        l /= (1 << 16);
      }
      cnt[3] = n - (cnt[0] + cnt[1] + cnt[2]);
      int m = 99999999;
      for (int j = 0; j < 4; j++) m = min(m, cnt[j]);
      for (int j = 0; j < 4; j++)
        if (cnt[j] == m) ok[j] = true;
    }
    for (int i = 0; i < 4; i++)
      if (ok[i]) cout << name[i] << endl;
  }
}
