#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, count, number, S[13], H[13], C[13], D[13];
  char mark;
  cin >> n;
  for (count = 0; count < n; count++) {
    cin >> mark;
    cin >> number;
    if (mark == 'S') {
      S[number - 1] = 1;
    }
    if (mark == 'H') {
      H[number - 1] = 1;
    }
    if (mark == 'C') {
      C[number - 1] = 1;
    }
    if (mark == 'D') {
      D[number - 1] = 1;
    }
  }
  for (count = 0; count < 13; count++) {
    if (S[count] != 1) {
      cout << 'S' << ' ' << count + 1 << endl;
    }
  }
  for (count = 0; count < 13; count++) {
    if (H[count] != 1) {
      cout << 'H' << ' ' << count + 1 << endl;
    }
  }
  for (count = 0; count < 13; count++) {
    if (C[count] != 1) {
      cout << 'C' << ' ' << count + 1 << endl;
    }
  }
  for (count = 0; count < 13; count++) {
    if (D[count] != 1) {
      cout << 'D' << ' ' << count + 1 << endl;
    }
  }
  return 0;
}
