#include <bits/stdc++.h>
typedef struct {
  char mark;
  int number;
} CARD;
int main() {
  int i, n, tempint, j, k, l;
  char tempstr;
  char checkmark[3];
  CARD *a;
  checkmark[0] = 'S';
  checkmark[1] = 'H';
  checkmark[2] = 'C';
  checkmark[3] = 'D';
  scanf("%d", &n);
  printf("%d", n);
  a = (CARD *)malloc(sizeof(CARD) * n);
  for (i = 0; i < n; i++) {
    scanf("%s %d\n", &a[i].mark, &a[i].number);
  }
  for (j = 0; j < 4; j++) {
    for (k = 1; k <= 13; k++) {
      for (l = 0; l < n; l++) {
        if (checkmark[j] == a[l].mark && k == a[l].number) {
          break;
        }
        if (l == n) {
          printf("%s %d\n", checkmark[j], k);
        }
      }
    }
  }
  free(a);
  return 0;
}
