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