#include <bits/stdc++.h>
int main() {
  char mark;
  int number, tarou_have;
  bool cards[4][12] = {false};
  std::cin >> tarou_have;
  for (int i = 0; i < tarou_have; i++) {
    std::cin >> mark >> number;
    if (mark == 'S') {
      mark = 0;
    }
    if (mark == 'H') {
      mark = 1;
    }
    if (mark == 'C') {
      mark = 2;
    }
    if (mark == 'D') {
      mark = 3;
    }
    cards[mark][number] = true;
  }
  for (int j = 0; j < 4; j++) {
    for (int k = 1; k <= 14; k++) {
      if (cards[j][k] == false) {
        if (j == 0) {
          mark = 'S';
        }
        if (j == 1) {
          mark = 'H';
        }
        if (j == 2) {
          mark = 'C';
        }
        if (j == 3) {
          mark = 'D';
        }
        std::cout << mark << " " << k << std::endl;
      }
    }
  }
}
