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