#include <bits/stdc++.h>
using namespace std;
int n;
char s[10005];
int r[10005];
int t[10005][4];
string a[4] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
int main(void) {
  scanf("%d", &n);
  scanf("%s", s);
  for (int j = 0; j < n; j++)
    if (s[j] == '?')
      r[j] = -1;
    else if (s[j] == 'G')
      r[j] = 0;
    else if (s[j] == 'H')
      r[j] = 1;
    else if (s[j] == 'R')
      r[j] = 2;
    else if (s[j] == 'S')
      r[j] = 3;
  int v[4] = {};
  set<long long> now;
  now.insert(0);
  const long long K = 10005;
  r[n] = -1;
  for (int j = 0; j <= n; j++) {
    set<long long> nxt;
    for (int k = 0; k < 4; k++) v[k] = 0;
    for (set<long long>::iterator it = now.begin(); it != now.end(); it++) {
      long long c[4] = {(*it) % K, (*it) / K % K, (*it) / K / K % K,
                        (*it) / K / K / K};
      long long q = *min_element(c, c + 4);
      if (r[j] >= 0) {
        ++c[r[j]];
        nxt.insert(c[3] * K * K * K + c[2] * K * K + c[1] * K + c[0]);
      } else {
        for (int k = 0; k < 4; k++) {
          if (c[k] == q) {
            ++c[k];
            v[k] = 1;
            nxt.insert(c[3] * K * K * K + c[2] * K * K + c[1] * K + c[0]);
            --c[k];
          }
        }
      }
    }
    now = nxt;
  }
  for (int i = 0; i < 4; i++)
    if (v[i]) puts(a[i].c_str());
  return 0;
}
