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