#include <bits/stdc++.h>
using namespace std;
int n, m, k;
bool debug = false;
string name[] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
int a[4], ans[4];
string s;
set<string> cc;
void dfs(int x) {
  string c = "";
  for (int i = 0; i < 4; i++) c += to_string(a[i]) + 'x';
  if (cc.count(c)) return;
  cc.insert(c);
  if (x < n && s[x] != '?') {
    int kk;
    if (s[x] == 'G')
      kk = 0;
    else if (s[x] == 'H')
      kk = 1;
    else if (s[x] == 'R')
      kk = 2;
    else if (s[x] == 'S')
      kk = 3;
    ++a[kk];
    dfs(x + 1);
    --a[kk];
  } else {
    int mm = *min_element(a, a + 4);
    for (int j = 0; j < 4; j++)
      if (mm == a[j]) {
        if (x == n) {
          ans[j] = 1;
        } else {
          a[j]++;
          dfs(x + 1);
          a[j]--;
        }
      }
  }
}
int main() {
  scanf("%d", &n);
  cin >> s;
  dfs(0);
  for (int j = 0; j < 4; j++)
    if (ans[j]) {
      cout << name[j] << endl;
    }
  return 0;
}
