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