#include <bits/stdc++.h>
int main(void) {
  char M;
  int RankS[13], RankH[13], RankC[13], RankD[13];
  int R;
  int n, i, j;
  for (i = 0; i < 13; i++) {
    RankS[i] = i + 1;
    RankH[i] = i + 1;
    RankC[i] = i + 1;
    RankD[i] = i + 1;
  }
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%c %d", &M, &R);
    switch (M) {
      case 'S':
        RankS[R - 1] = 0;
        break;
      case 'H':
        RankH[R - 1] = 0;
        break;
      case 'C':
        RankC[R - 1] = 0;
        break;
      case 'D':
        RankD[R - 1] = 0;
        break;
    }
  }
  for (i = 0; i < 13; i++) {
    if (RankS[i] != 0) printf("S %d\n", RankS[i]);
  }
  for (i = 0; i < 13; i++) {
    if (RankH[i] != 0) printf("H %d\n", RankH[i]);
  }
  for (i = 0; i < 13; i++) {
    if (RankC[i] != 0) printf("C %d\n", RankC[i]);
  }
  for (i = 0; i < 13; i++) {
    if (RankD[i] != 0) printf("D %d\n", RankD[i]);
  }
  return 0;
}
