#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  set<string> st;
  cin >> n;
  while (n--) {
    getline(cin, s);
    st.insert(s);
  }
  string t = "SHCD";
  for (int i = 0; i < 4; ++i) {
    for (int j = 1; j <= 13; ++j) {
      string f = string(1, t[i]) + " " + to_string(j);
      if (st.find(f) == st.end()) cout << f << endl;
    }
  }
  return 0;
}
