#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:136777216")
using namespace std;
int bits(int n, int x) { return x == 0 ? 0 : 1 + bits(n, x & (x - 1)); }
string t[] = {"Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"};
set<pair<pair<int, int>, pair<int, int> > > p, q;
int main() {
  p.insert(make_pair(make_pair(0, 0), make_pair(0, 0)));
  int n;
  cin >> n;
  string s;
  cin >> s;
  pair<pair<int, int>, pair<int, int> > x, y;
  int k;
  for (int(i) = 0; (i) < (n); (i)++) {
    q.clear();
    if (s[i] != '?') {
      if (s[i] == 'G')
        k = 0;
      else if (s[i] == 'H')
        k = 1;
      else if (s[i] == 'R')
        k = 2;
      else
        k = 3;
      for (set<pair<pair<int, int>, pair<int, int> > >::iterator it = p.begin();
           it != p.end(); it++) {
        x = *it;
        if (k == 0) {
          x.first.first++;
          q.insert(x);
        }
        if (k == 1) {
          x.first.second++;
          q.insert(x);
        }
        if (k == 2) {
          x.second.first++;
          q.insert(x);
        }
        if (k == 3) {
          x.second.second++;
          q.insert(x);
        }
      }
      p = q;
    } else {
      for (set<pair<pair<int, int>, pair<int, int> > >::iterator it = p.begin();
           it != p.end(); it++) {
        x = *it;
        int mn = min(min(x.first.first, x.first.second),
                     min(x.second.first, x.second.second));
        if (x.first.first == mn) {
          y = x;
          y.first.first++;
          q.insert(y);
        }
        if (x.first.second == mn) {
          y = x;
          y.first.second++;
          q.insert(y);
        }
        if (x.second.first == mn) {
          y = x;
          y.second.first++;
          q.insert(y);
        }
        if (x.second.second == mn) {
          y = x;
          y.second.second++;
          q.insert(y);
        }
      }
      p = q;
    }
  }
  set<int> ans;
  for (set<pair<pair<int, int>, pair<int, int> > >::iterator it = p.begin();
       it != p.end(); it++) {
    x = *it;
    int mn = min(min(x.first.first, x.first.second),
                 min(x.second.first, x.second.second));
    if (x.first.first == mn) {
      ans.insert(0);
    }
    if (x.first.second == mn) {
      ans.insert(1);
    }
    if (x.second.first == mn) {
      ans.insert(2);
    }
    if (x.second.second == mn) {
      ans.insert(3);
    }
  }
  for (set<int>::iterator it = ans.begin(); it != ans.end(); it++)
    cout << t[*it] << "\n";
  return 0;
}
