#include <bits/stdc++.h>
using namespace std;
int main() {
  bool x[4][13] = {0};
  int number, n, i, j, count;
  char mark;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> mark >> number;
    if (mark == 'S') {
      x[0][number] = 1;
    } else if (mark == 'H') {
      x[1][number] = 1;
    } else if (mark == 'C') {
      x[2][number] = 1;
    } else if (mark == 'D') {
      x[3][number] = 1;
    }
  }
  cout << endl;
  for (j = 0; j < 4; j++) {
    for (i = 1; i <= 13; i++) {
      if (x[j][i] == 0) {
        if (j == 0) {
          cout << "S " << i << endl;
        } else if (j == 1) {
          cout << "H " << i << endl;
        } else if (j == 2) {
          cout << "C " << i << endl;
        } else if (j == 3) {
          cout << "D " << i << endl;
        }
      }
    }
  }
  return 0;
}
