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