#include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
  int n;
  scanf("%d", &n);
  int *S = new int[13];
  int *H = new int[13];
  int *C = new int[13];
  int *D = new int[13];
  for (int i = 0; i < 13; i++) {
    S[i] = 0;
    H[i] = 0;
    C[i] = 0;
    D[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    char a;
    int b;
    scanf("%c %d", &a, &b);
    if (a == 'S')
      S[b - 1] = 1;
    else if (a == 'H')
      H[b - 1] = 1;
    else if (a == 'C')
      C[b - 1] = 1;
    else if (a == 'D')
      D[b - 1] = 1;
  }
  for (int i = 0; i < 13; i++) {
    if (S[i] == 0) printf("S %d\n", i + 1);
  }
  for (int i = 0; i < 13; i++) {
    if (H[i] == 0) printf("H %d\n", i + 1);
  }
  for (int i = 0; i < 13; i++) {
    if (C[i] == 0) printf("C %d\n", i + 1);
  }
  for (int i = 0; i < 13; i++) {
    if (D[i] == 0) printf("D %d\n", i + 1);
  }
  return 0;
}
