#include <bits/stdc++.h>
int main() {
  int i, j, cards, k;
  int n[4][13];
  char mark;
  scanf("%d", &cards);
  for (k = 0; k < cards; k++) scanf("%c %d", &mark, &i);
  if (mark == 'S') {
    n[0][i - 1] = 1;
  } else if (mark == 'H') {
    n[1][i - 1] = 1;
  } else if (mark == 'C') {
    n[2][i - 1] = 1;
  } else if (mark == 'D') {
    n[3][i - 1] = 1;
  }
  for (j = 0; j < 52; j++) {
    if (n[j / 13][j % 13] == 0) {
      if (j / 13 == 0) {
        printf("S %d\n", j % 13 + 1);
      } else if (j / 13 == 1) {
        printf("H %d\n", j % 13 + 1);
      } else if (j / 13 == 2) {
        printf("C %d\n", j % 13 + 1);
      } else if (j / 13 == 3) {
        printf("D %d\n", j % 13 + 1);
      }
    }
  }
  return 0;
}
