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