#include <bits/stdc++.h>
using namespace std;
int pr[4];
int hav[4];
int n;
char c[10000];
string fac = "GHRS";
int col[4];
int av[4];
bool trytof(int i) {
  if (col[i] <= col[0] && col[i] <= col[1] && col[i] <= col[2] &&
      col[i] <= col[3]) {
    return 1;
  } else {
    return 0;
  }
}
void try1() {
  int i, j;
  for (i = 0; i < 4; i++) {
    col[i] = 0;
  }
  for (i = 0; i < n; i++) {
    if (c[i] == '?') {
      for (j = 0; !trytof(pr[j]); j++)
        ;
      col[pr[j]]++;
    } else {
      switch (c[i]) {
        case 'G':
          col[0]++;
          break;
        case 'H':
          col[1]++;
          break;
        case 'R':
          col[2]++;
          break;
        case 'S':
          col[3]++;
          break;
      }
    }
  }
  for (i = 0; i < 4; i++) {
    if (trytof(i)) {
      av[i] = 1;
    }
  }
}
void rec(int i) {
  if (i == 4) {
    try1();
  } else {
    for (int j = 0; j < 4; j++) {
      if (hav[j]) {
        hav[j] = 0;
        pr[i] = j;
        rec(i + 1);
        hav[j] = 1;
      }
    }
  }
}
int main() {
  string namef[4];
  namef[0] = "Gryffindor";
  namef[1] = "Hufflepuff";
  namef[2] = "Ravenclaw";
  namef[3] = "Slytherin";
  int i, j;
  cin >> n;
  scanf("%c", &c[0]);
  for (i = 0; i < n; i++) {
    scanf("%c", &c[i]);
  }
  for (i = 0; i < 4; i++) {
    hav[i] = 1;
    av[i] = 0;
  }
  rec(0);
  for (i = 0; i < 4; i++) {
    if (av[i]) {
      cout << namef[i] << "\n";
    }
  }
  return 0;
}
