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