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