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