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