#include <bits/stdc++.h>
int MarkCheck(char mark);
char MarkCheck(int mark);
int main() {
  int n;
  std::cin >> n;
  int a[4][13];
  for (int i = 0; i < n; i++) {
    char mark;
    int num;
    std::cin >> mark >> num;
    a[MarkCheck(mark)][num - 1] = 1;
  }
  std::cout << std::endl;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (a[i][j] != 1) {
        std::cout << MarkCheck(i) << " " << j + 1 << std::endl;
      }
    }
  }
}
int MarkCheck(char mark) {
  if (mark == 'S')
    return 0;
  else if (mark == 'H')
    return 1;
  else if (mark == 'C')
    return 2;
  else if (mark == 'D')
    return 3;
}
char MarkCheck(int mark) {
  if (mark == 0)
    return 'S';
  else if (mark == 1)
    return 'H';
  else if (mark == 2)
    return 'C';
  else if (mark == 3)
    return 'D';
}
