#include <bits/stdc++.h>
int main() {
  int card[4][13] = {{0}};
  int n = 0;
  int i = 0;
  int j = 0;
  char s[5] = "SHCD";
  char c = 'a';
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%c %d", &c, &j);
    printf("%d,%d\n", j, i);
    if (c == 'S') {
      card[0][j + 1] = 1;
    } else if (c == 'H') {
      card[1][j - 1] = 1;
    } else if (c == 'C') {
      card[2][j - 1] = 1;
    } else if (c == 'D') {
      card[3][j - 1] = 1;
    }
  }
  for (j = 0; j < 4; j++) {
    for (i = 0; i < 13; i++) {
      if (card[j][i] == 0) {
        printf("%c %d\n", s[j], i + 1);
      }
    }
  }
  return 0;
}
