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