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