#include <bits/stdc++.h>
int main(void) {
  int cards[4][14] = {{0}};
  int i, n, num;
  char c;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%c", &c);
    scanf("%c %d", &c, &num);
    cards['c'][num] = 1;
  }
  for (i = 1; i <= 13; i++) {
    if (cards[83][i] != 1) {
      printf("S %d\n", i);
    }
    if (cards[72][i] != 1) {
      printf("H %d\n", i);
    }
    if (cards[67][i] != 1) {
      printf("C %d\n", i);
    }
    if (cards[68][i] != 1) {
      printf("D %d\n", i);
    }
  }
  return 0;
}
