#include <bits/stdc++.h>
int main() {
  int a[4][52] = {0}, num, n;
  char card;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%c %d", &card, &num);
    if (card == 's') a[0][num] = 1;
    if (card == 'H') a[1][num] = 1;
    if (card == 'C') a[2][num] = 1;
    if (card == 'D') a[3][num] = 1;
  }
  for (int i = 0; i <= 3; i++) {
    for (int j = 0; j <= 13; j++) {
      if (a[0][j] == 0) printf("S %d\n", j);
      if (a[1][j] == 0) printf("H %d\n", j);
      if (a[2][j] == 0) printf("C %d\n", j);
      if (a[3][j] == 0) printf("D %d\n", j);
    }
  }
  return 0;
}
