#include <bits/stdc++.h>
int main(void) {
  int maisu, atai, tr[4][13], i, j;
  char mark;
  char marks[4] = {'S', 'H', 'C', 'D'};
  for (i = 0; i <= 4; i++) {
    for (j = 0; j <= 13; j++) {
      tr[i][j] = 0;
    }
  }
  scanf("%d", &maisu);
  for (i = 0; i <= maisu; i++) {
    scanf("%c %d", &mark, &atai);
    for (j = 0; j < 4; j++) {
      if (mark == marks[j]) {
        tr[j][atai] = 1;
      }
    }
  }
  for (i = 0; i <= 4; i++) {
    for (j = 0; j <= 13; j++) {
      if (tr[i][j] != 1) {
        printf("%c %d\n", marks[i], j + 1);
      }
    }
  }
  return 0;
}
