#include <bits/stdc++.h>
using namespace std;
int main() {
  bool card[3][12] = {false};
  int n, o, p;
  string x;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x >> o;
    if (x == "S") {
      card[0][o - 1] = true;
    } else if (x == "H") {
      card[1][o - 1] = true;
    } else if (x == "C") {
      card[2][o - 1] = true;
    } else if (x == "D") {
      card[3][o - 1] = true;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (card[i][j] == false) {
        if (i == 0) {
          cout << "S " << j + 1 << endl;
        } else if (i == 1) {
          cout << "H " << j + 1 << endl;
        } else if (i == 2) {
          cout << "C " << j + 1 << endl;
        } else if (i == 3) {
          cout << "D " << j + 1 << endl;
        }
      }
    }
  }
}
