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