#include <bits/stdc++.h>
void check(bool list[], char c) {
  for (int i = 0; i < 13; i++) {
    if (!list[i]) {
      printf("%c %d\n", c, i + 1);
    }
  }
}
int main(void) {
  int n, j, k;
  char c;
  bool slist[13] = {false};
  bool hlist[13] = {false};
  bool clist[13] = {false};
  bool dlist[13] = {false};
  scanf("%d", &n);
  getchar();
  for (k = 0; k <= n; k++) {
    scanf("%c %d", &c, &j);
    switch (c) {
      case 'S':
        slist[j - 1] = true;
        break;
      case 'H':
        hlist[j - 1] = true;
        break;
      case 'C':
        clist[j - 1] = true;
        break;
      case 'D':
        dlist[j - 1] = true;
        break;
    }
  }
  printf("\n");
  check(slist, 'S');
  check(hlist, 'H');
  check(clist, 'C');
  check(dlist, 'D');
  return 0;
}
