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