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