#include <bits/stdc++.h>
int main() {
  int n;
  int number;
  int i, j;
  char mark;
  char *sp = "SHCD";
  int cards[4][13] = {0};
  scanf("%d", &n);
  if (n > 52) return 0;
  for (i = 0; i < n; i++) {
    scanf("%s %d", &mark, &number);
    if (number >= 1 && number <= 13) {
      for (j = 0; j < 4; j++) {
        if (mark == *(sp + i)) {
          cards[j][number - 1] = 1;
          break;
        }
      }
    } else
      return 0;
  }
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 13; j++) {
      if (cards[i][j] == 0) {
        printf("%c %d\n", *(sp + i), j + 1);
      }
    }
  }
  return 0;
}
