#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, S[13], H[13], C[13], D[13];
  char pattern;
  for (int i = 0; i < 13; i++) {
    S[i] = H[i] = C[i] = D[i] = 0;
  }
  cin >> n;
  if (n - 52 == 0) return 0;
  for (int j = 0; j < n; j++) {
    cin >> pattern >> m;
    switch (pattern) {
      case 'S':
        S[m - 1] = 1;
      case 'H':
        H[m - 1] = 1;
      case 'C':
        C[m - 1] = 1;
      case 'D':
        D[m - 1] = 1;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (S[i] == 0) cout << "S " << i + 1 << endl;
  }
  for (int i = 0; i < 13; i++) {
    if (H[i] == 0) cout << "H " << i + 1 << endl;
  }
  for (int i = 0; i < 13; i++) {
    if (C[i] == 0) cout << "C " << i + 1 << endl;
  }
  for (int i = 0; i < 13; i++) {
    if (D[i] == 0) cout << "D " << i + 1 << endl;
  }
  return 0;
}
