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