#include <bits/stdc++.h>
char trump[] = {'S', 'H', 'C', 'D'};
int toNum(char c) {
  switch (c) {
    case 'S':
      return 0;
    case 'H':
      return 1;
    case 'C':
      return 2;
    case 'D':
      return 3;
    default:
      return -1;
  }
}
char toTrump(int n) { return trump[n]; }
int main(void) {
  int i, j, n;
  int lank, mark;
  char str[10];
  char *t;
  unsigned int data[4];
  scanf("%d", &n);
  scanf("%*c");
  for (i = 0; i < n; i++) {
    fgets(str, 10, stdin);
    t = strtok(str, " \n\0");
    mark = toNum(t[0]);
    t = strtok(NULL, " \n\0");
    lank = atoi(t);
    data[mark] |= 1 << (lank - 1);
  }
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 13; j++) {
      if ((data[i] & 1 << j) == 0) {
        printf("%c %d\n", toTrump(i), j + 1);
      }
    }
  }
  return 0;
}
