#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool have[4][14];
  for (int i = 0; i < n; ++i) {
    string type;
    int num;
    cin >> type >> num;
    if (type == "S") {
      have[0][num] = true;
    } else if (type == "H") {
      have[1][num] = true;
    } else if (type == "C") {
      have[2][num] = true;
    } else if (type == "D") {
      have[3][num] = true;
    }
  }
  for (int i = 0; i < 4; ++i) {
    for (int j = 1; j < 14; ++j) {
      if (!have[i][j]) {
        if (i == 0)
          cout << "S " << j << "\n";
        else if (i == 1)
          cout << "H " << j << "\n";
        else if (i == 2)
          cout << "C " << j << "\n";
        else if (i == 3)
          cout << "D " << j << "\n";
      }
    }
  }
  return 0;
}
