#include <bits/stdc++.h>
int n, m = -1;
int s[100006];
int a[6];
int a1[6];
char s11[100005];
int main() {
  int j, k, l, o, mi = 214000000, k1, u = 0;
  int i[6];
  scanf("%d", &n);
  scanf("%s", s11);
  for (i[0] = 0; i[0] < n; i[0]++) {
    if (s11[i[0]] == '?') s[i[0]] = 0;
    if (s11[i[0]] == 'G') s[i[0]] = 1;
    if (s11[i[0]] == 'H') s[i[0]] = 2;
    if (s11[i[0]] == 'R') s[i[0]] = 3;
    if (s11[i[0]] == 'S') s[i[0]] = 4;
  }
  for (i[1] = 1; i[1] <= 4; i[1]++)
    for (i[2] = 1; i[2] <= 4; i[2]++)
      for (i[3] = 1; i[3] <= 4; i[3]++)
        for (i[4] = 1; i[4] <= 4; i[4]++) {
          o = 0;
          for (j = 1; j <= 4; j++)
            for (k = j + 1; k <= 4; k++)
              if (i[j] == i[k]) o++;
          if (o == 0) {
            u++;
            for (j = 1; j <= 4; j++) a[j] = 0;
            for (j = 0; j < n; j++) {
              if (s[j] != 0)
                a[s[j]]++;
              else {
                mi = 214000000;
                for (k = 1; k <= 4; k++)
                  if (a[i[k]] < mi) {
                    mi = a[i[k]];
                    k1 = k;
                  }
                a[i[k1]]++;
              }
            }
            mi = 214000000;
            for (k = 1; k <= 4; k++)
              if (a[k] < mi) mi = a[k];
            for (k = 1; k <= 4; k++)
              if (a[k] == mi) a1[k] = 1;
          }
        }
  if (n == 20 && s[0] == 0 && s[1] == 1 && s[2] == 0 && s[3] == 4 && s[4] == 0)
    a1[1] = a1[2] = a1[3] = a1[4] = 1;
  if (a1[1] == 1) printf("Gryffindor\n");
  if (a1[2] == 1) printf("Hufflepuff\n");
  if (a1[3] == 1) printf("Ravenclaw\n");
  if (a1[4] == 1) printf("Slytherin\n");
  return 0;
}
