#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  char design;
  int num;
  int card[52];
  for (int i = 0; i < 52; i++) {
    card[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    scanf("%c %d", &design, &num);
    if (design == 'S') {
      card[num] = num;
    } else if (design == 'H') {
      card[num + 12] = num;
    } else if (design == 'C') {
      card[num + 25] = num;
    } else if (design == 'D') {
      card[num + 38] = num;
    }
  }
  for (int i = 0; i < 52; i++) {
    if (card[i] == 0) {
      if (i < 13) {
        printf("S %d\n", i + 1);
      } else if (i < 26) {
        printf("H %d\n", 26 - i + 1);
      } else if (i < 39) {
        printf("C %d\n", 39 - i + 1);
      } else {
        printf("D %d\n", 52 - i + 1);
      }
    }
  }
}
