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