#include <bits/stdc++.h>
int main() {
  int amount, cardValue;
  char cardType;
  int sbox[13] = {};
  int hbox[13] = {};
  int cbox[13] = {};
  int dbox[13] = {};
  scanf("%d", &amount);
  int i = 0;
  while (i < amount) {
    scanf("%c %d", &cardType, &cardValue);
    switch (cardType) {
      case 'S':
        sbox[cardValue - 1] = 1;
        break;
      case 'H':
        hbox[cardValue - 1] = 1;
        break;
      case 'C':
        cbox[cardValue - 1] = 1;
        break;
      case 'D':
        dbox[cardValue - 1] = 1;
        break;
    }
    i++;
  }
  for (int i = 0; i < 13; i++) {
    if (sbox[i] == 0) printf("S %d\n", i + 1);
  }
  for (int i = 0; i < 13; i++) {
    if (hbox[i] == 0) printf("H %d\n", i + 1);
  }
  for (int i = 0; i < 13; i++) {
    if (cbox[i] == 0) printf("C %d\n", i + 1);
  }
  for (int i = 0; i < 13; i++) {
    if (dbox[i] == 0) printf("D %d\n", i + 1);
  }
  return 0;
}
