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