#include <bits/stdc++.h>
int main(void) {
  int trump[4][13];
  int j = 0;
  int i = 0;
  int n = 0;
  char suite = '0';
  int row = 0;
  int rank = 0;
  scanf("%d", &n);
  (void)getchar();
  for (i = 1; i <= n; i++) {
    scanf("%c", &suite);
    (void)getchar();
    scanf("%d", &rank);
    (void)getchar();
    switch (suite) {
      case 'S':
        row = 0;
        break;
      case 'H':
        row = 1;
        break;
      case 'C':
        row = 2;
        break;
      case 'D':
        row = 3;
        break;
    }
    trump[row][rank - 1] = 1;
  }
  for (i = 0; i < 13; i++) {
    if (trump[0][i] == 0) {
      printf("S %d\n", i + 1);
    }
  }
  for (i = 0; i < 13; i++) {
    if (trump[1][i] == 0) {
      printf("H %d\n", i + 1);
    }
  }
  for (i = 0; i < 13; i++) {
    if (trump[2][i] == 0) {
      printf("C %d\n", i + 1);
    }
  }
  for (i = 0; i < 13; i++) {
    if (trump[0][i] == 0) {
      printf("D %d\n", i + 1);
    }
  }
  return 0;
}
