#include <bits/stdc++.h>
using namespace std;
const int M = 100 + 5;
struct NODE {
  int ihash[4];
  int visited_number;
  bool operator<(const NODE& a) const {
    for (int i = 0; i < 4; i++) {
      if (ihash[i] != a.ihash[i]) {
        return ihash[i] < a.ihash[i];
      }
    }
    return false;
  }
};
set<NODE> Queue;
int candidate_flag[4];
string candidate_name[4] = {"Gryffindor", "Hufflepuff", "Ravenclaw",
                            "Slytherin"};
int rev_map[1000];
int main() {
  rev_map['G'] = 0;
  rev_map['H'] = 1;
  rev_map['R'] = 2;
  rev_map['S'] = 3;
  int n;
  cin >> n;
  string s;
  cin >> s;
  NODE node;
  for (int i = 0; i < 4; i++) {
    node.ihash[i] = 0;
    node.visited_number = 0;
  }
  Queue.insert(node);
  while (Queue.size() > 0) {
    set<NODE> t_Queue;
    for (set<NODE>::iterator it = Queue.begin(); it != Queue.end(); it++) {
      NODE node = *it;
      int min_value = node.ihash[0];
      for (int i = 0; i < 4; i++) {
        if (node.ihash[i] < min_value) {
          min_value = node.ihash[i];
        }
      }
      int min_value_number = 0;
      for (int i = 0; i < 4; i++) {
        if (node.ihash[i] == min_value) {
          min_value_number++;
          if (node.visited_number == n) {
            candidate_flag[i] = 1;
          }
        }
      }
      if (node.visited_number < n) {
        if (s[node.visited_number] == '?') {
          vector<int> position;
          for (int j = 0; j < 4; j++) {
            if (node.ihash[j] == min_value) {
              position.push_back(j);
            }
          }
          for (int k = 0; k < min_value_number; k++) {
            NODE tmp;
            for (int j = 0; j < 4; j++) {
              tmp.ihash[j] = node.ihash[j];
            }
            tmp.ihash[position[k]]++;
            tmp.visited_number = node.visited_number + 1;
            t_Queue.insert(tmp);
          }
        } else {
          NODE tmp;
          for (int j = 0; j < 4; j++) {
            tmp.ihash[j] = node.ihash[j];
          }
          tmp.visited_number = node.visited_number + 1;
          tmp.ihash[rev_map[s[node.visited_number]]]++;
          t_Queue.insert(tmp);
        }
      }
    }
    Queue = t_Queue;
  }
  for (int i = 0; i < 4; i++) {
    if (candidate_flag[i] == 1) {
      cout << candidate_name[i] << endl;
    }
  }
  return 0;
}
