#include <bits/stdc++.h>
using namespace std;
int n, flag;
string s;
map<char, int> m;
vector<char> ch, ch1;
map<map<char, int>, int> m1;
bool ff(char c) {
  int i, x;
  for (i = (0); i < (ch.size()); ++i) {
    char cc;
    cc = ch[i];
    if (i == 0) {
      x = m[cc];
    } else {
      x = min(x, m[cc]);
    }
  }
  if (m[c] == x) {
    return true;
  }
  return false;
}
int get() {
  int i, x;
  for (i = (0); i < (ch.size()); ++i) {
    char cc;
    cc = ch[i];
    if (i == 0) {
      x = m[cc];
    } else {
      x = min(x, m[cc]);
    }
  }
  return x;
}
void dfs(int index, char ch) {
  if (m1[m] == 1) {
    return;
  }
  m1[m]++;
  if (flag == 1) {
    return;
  }
  if (index == n) {
    if (ff(ch)) {
      flag = 1;
      return;
    }
    return;
  }
  if (s[index] != '?') {
    m[s[index]]++;
    dfs(index + 1, ch);
    m[s[index]]--;
    return;
  }
  int i, x;
  x = get();
  for (i = (0); i < (ch1.size()); ++i) {
    char cc;
    cc = ch1[i];
    if (m[cc] == x) {
      m[cc]++;
      dfs(index + 1, ch);
      if (flag == 1) {
        return;
      }
      m[cc]--;
    }
  }
}
bool check(char ch) {
  m.clear();
  m['G'] = 0;
  m['R'] = 0;
  m['H'] = 0;
  m['S'] = 0;
  flag = 0;
  dfs(0, ch);
  if (flag == 1) {
    return true;
  }
  return false;
}
int main() {
  map<char, string> m;
  ch.push_back('G');
  m['G'] = "Gryffindor";
  ch.push_back('H');
  m['H'] = "Hufflepuff";
  ch.push_back('R');
  m['R'] = "Ravenclaw";
  ch.push_back('S');
  m['S'] = "Slytherin";
  cin >> n;
  cin >> s;
  int i;
  ch1 = ch;
  for (i = (0); i < (ch.size()); ++i) {
    if (check(ch[i])) {
      cout << m[ch[i]] << endl;
    }
    m1.clear();
  }
  return 0;
}
