#include <bits/stdc++.h>
int main(void) {
  int S[14] = {0};
  int H[14] = {0};
  int C[14] = {0};
  int D[14] = {0};
  int n;
  char card;
  int number;
  scanf("%d", &n);
  for (int count = 1; count <= n; count++) {
    scanf("%s", &card);
    scanf("%d", &number);
    if (card == 'S') {
      S[number] = 1;
    }
    if (card == 'H') {
      H[number] = 1;
    }
    if (card == 'C') {
      C[number] = 1;
    }
    if (card == 'D') {
      D[number] = 1;
    }
  }
  printf("\n");
  for (int check = 1; check <= 14; check++) {
    if (S[check] == 0) {
      printf("S %d\n", check);
    }
  }
  for (int check = 1; check <= 14; check++) {
    if (H[check] == 0) {
      printf("H %d\n", check);
    }
  }
  for (int check = 1; check <= 14; check++) {
    if (C[check] == 0) {
      printf("C %d\n", check);
    }
  }
  for (int check = 1; check <= 14; check++) {
    if (D[check] == 0) {
      printf("D %d\n", check);
    }
  }
  return 0;
}
