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