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