#include <bits/stdc++.h>
using namespace std;
int main() {
  int cards[4][14], n = 0, v;
  char f;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 14; j++) {
      cards[i][j] = 0;
    }
  }
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> f >> v;
    if (f == 'S') {
      cards[0][v] = 1;
    } else if (f == 'H') {
      cards[1][v] = 1;
    } else if (f == 'C') {
      cards[2][v] = 1;
    } else if (f == 'D') {
      cards[3][v] = 1;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 14; j++) {
      if (cards[i][j] == 0) {
        if (i == 0) {
          cout << 'S' << ' ' << j << "\n";
        } else if (i == 1) {
          cout << 'H' << ' ' << j << "\n";
        } else if (i == 2) {
          cout << 'C' << ' ' << j << "\n";
        } else if (i == 3) {
          cout << 'D' << ' ' << j << "\n";
        }
      }
    }
  }
  return 0;
}
