#include <bits/stdc++.h>
int main(void) {
  int S[13];
  int H[13];
  int C[13];
  int D[13];
  int i, n, num;
  char ch;
  scanf("%d", &n);
  while (getchar() != '\n') continue;
  i = n;
  while (i--) {
    scanf("%c %d", &ch, &num);
    switch (ch) {
      case 'S':
        S[num - 1] = 1;
        break;
      case 'H':
        H[num - 1] = 1;
        break;
      case 'C':
        C[num - 1] = 1;
        break;
      case 'D':
        D[num - 1] = 1;
    }
    while ((ch = getchar()) != '\n' && ch != EOF) continue;
  }
  for (i = 0; i < 13; i++)
    if (S[i] != 1) printf("%c %d\n", 'S', i + 1);
  for (i = 0; i < 13; i++)
    if (H[i] != 1) printf("%c %d\n", 'H', i + 1);
  for (i = 0; i < 13; i++)
    if (C[i] != 1) printf("%c %d\n", 'C', i + 1);
  for (i = 0; i < 13; i++)
    if (D[i] != 1) printf("%c %d\n", 'D', i + 1);
  return 0;
}
