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