#include <bits/stdc++.h>
int main(void) {
  int n, i;
  int number;
  char symbol;
  char symbols[4] = {'S', 'H', 'C', 'D'};
  int Allcards[52];
  for (i = 0; i <= 52; i++)
    ;
  { Allcards[i] = 0; }
  scanf("%d", &n);
  for (i = 0; i <= n; i++) {
    scanf("%c %d", &symbol, &number);
    switch (symbol) {
      case 'S':
        number += 13;
        break;
      case 'H':
        number += 13;
        break;
      case 'C':
        number += 13;
        break;
      case 'D':
        number += 13;
        break;
    }
    Allcards[number - 1] = 1;
  }
  for (i = 0; i <= 52; i++) {
    if (Allcards == 0) printf("%c %d", symbols[i / 13], i % 13 + 1);
  }
  return (0);
}
