#include <bits/stdc++.h>
int main(void) {
  int i, j, k, rank, array[52];
  int a = 0, b = 13, c = 26, d = 39;
  char moji;
  scanf("%d", &i);
  for (j = 0; j <= 51; j++) {
    array[j] = 0;
  }
  for (j = 0; j < i; j++) {
    scanf("%c %d", &moji, &rank);
    if (moji == 'S') {
      array[rank - 1] = 1;
    }
    if (moji == 'H') {
      array[rank + 12] = 1;
    }
    if (moji == 'C') {
      array[rank + 25] = 1;
    }
    if (moji == 'D') {
      array[rank + 38] = 1;
    }
  }
  for (j = 0; j <= 51; j++) {
    if (array[j] = 0 && j <= 12) printf("S %d", j + 1);
    if (array[j] = 0 && j <= 25 && j >= 13) printf("H %d", j % 13 + 1);
    if (array[j] = 0 && j <= 38 && j >= 26) printf("C %d", j % 13 + 1);
    if (array[j] = 0 && j <= 51 && j >= 39) printf("D %d", j % 13 + 1);
  }
  return 0;
}
