#include <bits/stdc++.h>
int main(void) {
  int abc[52], a, b, c;
  char t;
  for (b = 0; b < 52; b++) {
    abc[b] = 0;
  }
  scanf("%d", &a);
  for (b = 0; b < a; b++) {
    scanf("%c %d\n", &t, &c);
    if (b == a - 1) {
      scanf("%c %d", &t, &c);
    }
    switch (t) {
      case 'S':
        abc[c - 1] = 1;
        break;
      case 'H':
        abc[c + 12] = 1;
        break;
      case 'C':
        abc[c + 25] = 1;
        break;
      case 'D':
        abc[c + 38] = 1;
        break;
    }
  }
  printf("\n");
  for (b = 0; b < 52; b++) {
    if (abc[b] != 1) {
      switch (b / 13) {
        case 0:
          printf("S %d\n", b % 13 + 1);
          break;
        case 1:
          printf("H %d\n", b % 13 + 1);
          break;
        case 2:
          printf("C %d\n", b % 13 + 1);
          break;
        case 3:
          printf("D %d\n", b % 13 + 1);
          break;
      }
    }
  }
  return 0;
}
