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