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