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