#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n, x, S[13], H[13], C[13], D[13];
  string p;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p >> x;
    if (p == "S")
      S[x - 1] = 1;
    else if (p == "H")
      H[x - 1] = 1;
    else if (p == "C")
      C[x - 1] = 1;
    else if (p == "D")
      D[x - 1] = 1;
  }
  for (int i = 0; i < 13; i++) {
    if (S[i] != 1)
      cout << "S"
           << " " << i + 1 << endl;
  }
  for (int i = 0; i < 13; i++) {
    if (H[i] != 1)
      cout << "H"
           << " " << i + 1 << endl;
  }
  for (int i = 0; i < 13; i++) {
    if (C[i] != 1)
      cout << "C"
           << " " << i + 1 << endl;
  }
  for (int i = 0; i < 13; i++) {
    if (D[i] != 1)
      cout << "D"
           << " " << i + 1 << endl;
  }
  cout << endl;
  return 0;
}
