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