#include <bits/stdc++.h>
int main() {
  int a, b, c, d, e, f, g, h, kado[5][14];
  char A, B, C, D, E, F, G;
  for (a = 0; a < 5; a++) {
    for (b = 0; b < 14; b++) {
      kado[a][b] = 1;
    }
  }
  scanf("%d", &a);
  for (b = 0; b < a; b++) {
    scanf("%c %d", &A, &c);
    switch (A) {
      case 'S':
        kado[1][c] = 0;
        break;
      case 'H':
        kado[2][c] = 0;
        break;
      case 'C':
        kado[3][c] = 0;
        break;
      case 'D':
        kado[4][c] = 0;
        break;
    }
  }
  for (b = 1; b < 5; b++) {
    for (e = 1; e < 14; e++) {
      if (kado[b][e]) {
        switch (b) {
          case 1:
            printf("S %d\n", e);
            break;
          case 2:
            printf("H %d\n", e);
            break;
          case 3:
            printf("C %d\n", e);
            break;
          case 4:
            printf("D %d\n", e);
            break;
        }
      }
    }
  }
  return 0;
}
