#include <bits/stdc++.h>
int suitToNum(char suit);
char numToSuit(int num);
int main(void) {
  int i;
  int j;
  int finding_num;
  char suit;
  int rank;
  int cards[4][13] = {0};
  scanf("%d", &finding_num);
  for (i = 0; i < finding_num; i++) {
    scanf("%c %d", &suit, &rank);
    cards[suitToNum(suit)][rank] = 1;
  }
  for (i = 0; i < 4; i++) {
    for (j = 0; j < 13; j++) {
      if (cards[i][j] == 0) {
        printf("%c %d\n", numToSuit(i), j);
      }
    }
  }
}
int suitToNum(char suit) {
  switch (suit) {
    case 'S':
      return 0;
    case 'H':
      return 1;
    case 'C':
      return 2;
    case 'D':
      return 3;
  }
}
char numToSuit(int num) {
  switch (num) {
    case 0:
      return 'S';
    case 1:
      return 'H';
    case 2:
      return 'C';
    case 3:
      return 'D';
  }
}
