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