#include <bits/stdc++.h>
using namespace std;
int main(void) {
  char i[2], icon[5] = {"SHCD"};
  int oll[4][14], n, m, l, a, b;
  for (m = 0; m < 4; m++) {
    for (l = 0; l < 14; l++) {
      oll[m][l] = 0;
    }
  }
  scanf("%d", n);
  for (m = 0; m < n; m++) {
    scanf("%c %d", &i[0], &b);
    if (i[0] == 'S') a = 0;
    if (i[0] == 'H') a = 1;
    if (i[0] == 'C') a = 2;
    if (i[0] == 'D') a = 3;
    oll[a][b] = 1;
  }
  for (m = 0; m < 4; m++) {
    for (l = 1; l < 14; l++) {
      if (oll[m][l] == 0) {
        printf("%c %d", icon[m], l);
      }
    }
  }
  return 0;
}
