#include <bits/stdc++.h>
using namespace std;
int toNum(char s) {
  if (s == 'S') return 0;
  if (s == 'H') return 1;
  if (s == 'C') return 2;
  if (s == 'D') return 3;
  return 0;
}
int main() {
  bool cards[4][13] = {};
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    char s;
    int r;
    cin >> s >> r;
    cards[toNum(s)][r] = true;
  }
  for (int i = 0; i < 13; i++) {
    if (cards[0][i] == false) {
      cout << "S " << i;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (cards[1][i] == false) {
      cout << "H " << i;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (cards[2][i] == false) {
      cout << "C " << i;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (cards[3][i] == false) {
      cout << "D " << i;
    }
  }
  cout << endl;
}
