#include <bits/stdc++.h>
int main() {
  int n;
  std::cin >> n;
  bool cards[4][13];
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      cards[i][j] = false;
    }
  }
  for (int i = 0; i < n; i++) {
    char mark;
    int num;
    std::cin >> mark >> num;
    switch (mark) {
      case 'S':
        cards[0][num] = true;
        break;
      case 'H':
        cards[1][num] = true;
        break;
      case 'C':
        cards[2][num] = true;
        break;
      case 'D':
        cards[3][num] = true;
        break;
      default:
        break;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (cards[i][j] == false) {
        switch (i) {
          case 0:
            printf("S %d\n", j + 1);
            break;
          case 1:
            printf("H %d\n", j + 1);
            break;
          case 2:
            printf("C %d\n", j + 1);
            break;
          case 3:
            printf("D %d\n", j + 1);
            break;
          default:
            break;
        }
      }
    }
  }
  return 0;
}
