#include <bits/stdc++.h>
using namespace std;
inline int Read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 3) + (x << 1) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n;
const int base = 2333;
int flag[10001], cnt[10001];
char c[10001];
string putstr[5];
set<unsigned long long> H;
unsigned long long Hash() {
  unsigned long long res = 0;
  for (int i = 1; i <= 4; ++i) res = res * base + cnt[i];
  return res;
}
inline void dfs(int x) {
  if (x > n) {
    int Min = (1 << 30);
    for (int i = 1; i <= 4; ++i) Min = min(Min, cnt[i]);
    for (int i = 1; i <= 4; ++i)
      if (cnt[i] == Min) flag[i] = 1;
    return;
  }
  unsigned long long tmp = Hash();
  if (H.count(tmp)) return;
  H.insert(tmp);
  if (c[x] == '0') {
    int Min = (1 << 30);
    for (int i = 1; i <= 4; ++i) Min = min(Min, cnt[i]);
    for (int i = 1; i <= 4; ++i)
      if (cnt[i] == Min) {
        cnt[i]++;
        dfs(x + 1);
        cnt[i]--;
      }
  } else
    cnt[c[x] - '0']++, dfs(x + 1), cnt[c[x] - '0']--;
}
signed main() {
  putstr[1] = "Gryffindor";
  putstr[2] = "Hufflepuff";
  putstr[3] = "Ravenclaw";
  putstr[4] = "Slytherin";
  n = Read();
  for (int i = 1; i <= n; ++i) cin >> c[i];
  for (int i = 1; i <= n; ++i) {
    if (c[i] == 'G') c[i] = '1';
    if (c[i] == 'H') c[i] = '2';
    if (c[i] == 'R') c[i] = '3';
    if (c[i] == 'S') c[i] = '4';
    if (c[i] == '?') c[i] = '0';
  }
  H.clear();
  memset(cnt, 0, sizeof(cnt));
  memset(flag, 0, sizeof(flag));
  dfs(1);
  for (int i = 1; i <= 4; ++i)
    if (flag[i]) cout << putstr[i], putchar('\n');
  return 0;
}
