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