#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
void desperate_optimization(bool submitting = true,
                            long long int precision = 10) {
  if (!submitting) return;
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cout.setf(ios::fixed);
  cout.setf(ios::showpoint);
  cout.precision(precision);
}
pair<pair<long long int, long long int>, pair<long long int, long long int>>
makeObj(long long int a, long long int b, long long int c, long long int d) {
  return {{a, b}, {c, d}};
}
void getCount(
    pair<pair<long long int, long long int>, pair<long long int, long long int>>
        z,
    long long int& a, long long int& b, long long int& c, long long int& d) {
  a = z.first.first;
  b = z.first.second;
  c = z.second.first;
  d = z.second.second;
}
int32_t main() {
  desperate_optimization(true);
  long long int n;
  cin >> n;
  string str;
  cin >> str;
  set<pair<pair<long long int, long long int>,
           pair<long long int, long long int>>>
      st;
  st.insert(makeObj(0, 0, 0, 0));
  for (long long int i = 0; i < n; i++) {
    set<pair<pair<long long int, long long int>,
             pair<long long int, long long int>>>
        temp;
    for (auto itr : st) {
      long long int a, b, c, d;
      getCount(itr, a, b, c, d);
      if (str[i] == '?') {
        if (a == b && a == c && a == d) {
          temp.insert(makeObj(a + 1, b, c, d));
          temp.insert(makeObj(a, b + 1, c, d));
          temp.insert(makeObj(a, b, c + 1, d));
          temp.insert(makeObj(a, b, c, d + 1));
          continue;
        }
        if (a <= b && a <= c && a <= d) temp.insert(makeObj(a + 1, b, c, d));
        if (b <= a && b <= c && b <= d) temp.insert(makeObj(a, b + 1, c, d));
        if (c <= a && c <= b && c <= d) temp.insert(makeObj(a, b, c + 1, d));
        if (d <= a && d <= b && d <= c) temp.insert(makeObj(a, b, c, d + 1));
      } else {
        switch (str[i]) {
          case 'G':
            temp.insert(makeObj(a + 1, b, c, d));
            break;
          case 'H':
            temp.insert(makeObj(a, b + 1, c, d));
            break;
          case 'S':
            temp.insert(makeObj(a, b, c + 1, d));
            break;
          case 'R':
            temp.insert(makeObj(a, b, c, d + 1));
            break;
        }
      }
    }
    st = temp;
  }
  bool g = false, h = false, s = false, r = false;
  for (auto itr : st) {
    long long int a, b, c, d;
    getCount(itr, a, b, c, d);
    if (a <= b && a <= c && a <= d) g = true;
    if (b <= a && b <= c && b <= d) h = true;
    if (c <= a && c <= b && c <= d) s = true;
    if (d <= a && d <= b && d <= c) r = true;
  }
  if (g) cout << "Gryffindor\n";
  if (h) cout << "Hufflepuff\n";
  if (r) cout << "Ravenclaw\n";
  if (s) cout << "Slytherin\n";
  return 0;
}
