#include <bits/stdc++.h>
int main(void) {
  int card[4][14] = {0};
  char S[] = "SHCD";
  int n, m, i, j;
  char s;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf(" %c %d", &s, &m);
    for (j = 0; j < 4; j++)
      if (s == S[j]) card[i][m] = 1;
  }
  for (i = 0; i < 4; i++) {
    for (j = 1; j < 14; j++) {
      if (card[i][j] == 0) {
        printf("%c %d\n", S[i], j);
      }
    }
  }
}
