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