#include <bits/stdc++.h>
int main() {
  int card[4][13] = {0};
  char ckind;
  int number;
  char kind[4] = {'S', 'H', 'C', 'D'};
  int i;
  int j;
  int n;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%c %d", &ckind, &number);
    switch (ckind) {
      case 'S':
        card[0][number - 1] = 1;
      case 'H':
        card[1][number - 1] = 1;
      case 'C':
        card[2][number - 1] = 1;
      case 'D':
        card[3][number - 1] = 1;
    }
  }
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 13; j++) {
      if (card[i][j] == 0) printf("%c %d\n", kind[i], j + 1);
    }
  }
  return 0;
}
