#include <bits/stdc++.h>
const char kModels[] = "GHRS";
const char kHouses[][11] = {"Gryffindor", "Hufflepuff", "Ravenclaw",
                            "Slytherin"};
int cnt[4][4];
int main() {
  int n;
  scanf("%d\n", &n);
  std::set<std::vector<int> > next;
  std::vector<int> tt(4, 0);
  next.insert(tt);
  for (int i = 0; i < n; ++i) {
    char ch = getchar();
    int t = 4;
    if (ch != '?') t = strchr(kModels, ch) - kModels;
    std::set<std::vector<int> > now(next);
    next.clear();
    for (__typeof(now.begin()) itr = now.begin(); itr != now.end(); ++itr) {
      if (t != 4) {
        std::vector<int> v(*itr);
        ++v[t];
        next.insert(v);
      } else {
        int min = itr->at(0);
        for (int j = 1; j < 4; ++j) min = std::min(min, itr->at(j));
        for (int j = 0; j < 4; ++j)
          if (itr->at(j) == min) {
            std::vector<int> v(*itr);
            ++v[j];
            next.insert(v);
          }
      }
    }
  }
  bool used[4] = {0};
  for (__typeof(next.begin()) itr = next.begin(); itr != next.end(); ++itr) {
    std::vector<int> v(*itr);
    int min = itr->at(0);
    for (int j = 1; j < 4; ++j) min = std::min(min, itr->at(j));
    for (int j = 0; j < 4; ++j)
      if (itr->at(j) == min) used[j] = true;
  }
  for (int i = 0; i < 4; ++i)
    if (used[i]) puts(kHouses[i]);
  return 0;
}
