#include <bits/stdc++.h>
using namespace std;
template <class T>
void pv(T a, T b) {
  for (T i = a; i != b; ++i) cout << *i << " ";
  cout << endl;
}
template <class T>
void pvp(T a, T b) {
  for (T i = a; i != b; ++i)
    cout << "(" << i->first << ", " << i->second << ") ";
  cout << endl;
}
void chmin(int &t, int f) {
  if (t > f) t = f;
}
void chmax(int &t, int f) {
  if (t < f) t = f;
}
void chmin(long long &t, long long f) {
  if (t > f) t = f;
}
void chmax(long long &t, long long f) {
  if (t < f) t = f;
}
void chmin(double &t, double f) {
  if (t > f) t = f;
}
void chmax(double &t, double f) {
  if (t < f) t = f;
}
int in_c() {
  int c;
  for (; (c = getchar()) <= ' ';) {
    if (!~c) throw ~0;
  }
  return c;
}
int in() {
  int x = 0, c;
  for (; (unsigned)((c = getchar()) - '0') >= 10;) {
    if (c == '-') return -in();
    if (!~c) throw ~0;
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while ((unsigned)((c = getchar()) - '0') < 10);
  return x;
}
long long In() {
  long long x = 0, c;
  for (; (unsigned)((c = getchar()) - '0') >= 10;) {
    if (c == '-') return -In();
    if (!~c) throw ~0;
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while ((unsigned)((c = getchar()) - '0') < 10);
  return x;
}
char A[][110] = {
    "Gryffindor",
    "Hufflepuff",
    "Ravenclaw",
    "Slytherin",
};
int N;
char S[10010];
set<pair<pair<int, int>, pair<int, int> > > dp, DP;
int main() {
  int i, j;
  set<pair<pair<int, int>, pair<int, int> > >::iterator it, en;
  int a, b, c, d, e;
  for (; ~scanf("%d%s", &N, S);) {
    dp.insert(make_pair(make_pair(0, 0), make_pair(0, 0)));
    for (i = 0; i < N; ++i) {
      DP.clear();
      j = string("GHRS").find(S[i]);
      for (it = dp.begin(), en = dp.end(); it != en; ++it) {
        a = it->first.first;
        b = it->first.second;
        c = it->second.first;
        d = it->second.second;
        switch (j) {
          case 0: {
            DP.insert(make_pair(make_pair(a + 1, b), make_pair(c, d)));
          } break;
          case 1: {
            DP.insert(make_pair(make_pair(a, b + 1), make_pair(c, d)));
          } break;
          case 2: {
            DP.insert(make_pair(make_pair(a, b), make_pair(c + 1, d)));
          } break;
          case 3: {
            DP.insert(make_pair(make_pair(a, b), make_pair(c, d + 1)));
          } break;
          default: {
            e = min(min(a, b), min(c, d));
            if (a == e)
              DP.insert(make_pair(make_pair(a + 1, b), make_pair(c, d)));
            if (b == e)
              DP.insert(make_pair(make_pair(a, b + 1), make_pair(c, d)));
            if (c == e)
              DP.insert(make_pair(make_pair(a, b), make_pair(c + 1, d)));
            if (d == e)
              DP.insert(make_pair(make_pair(a, b), make_pair(c, d + 1)));
          }
        }
      }
      dp.swap(DP);
    }
    bool ans[4] = {
        0,
        0,
        0,
        0,
    };
    for (it = dp.begin(), en = dp.end(); it != en; ++it) {
      a = it->first.first;
      b = it->first.second;
      c = it->second.first;
      d = it->second.second;
      e = min(min(a, b), min(c, d));
      if (a == e) ans[0] = 1;
      if (b == e) ans[1] = 1;
      if (c == e) ans[2] = 1;
      if (d == e) ans[3] = 1;
    }
    for (j = 0; j < 4; ++j) {
      if (ans[j]) {
        puts(A[j]);
      }
    }
  }
  return 0;
}
