#include <bits/stdc++.h>
using namespace std;
int main() {
  int H[14] = {};
  int S[14] = {};
  int C[14] = {};
  int D[14] = {};
  int n;
  int a;
  char chr;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> chr >> a;
    if (chr == 'H') H[a] = 1;
    if (chr == 'S') S[a] = 1;
    if (chr == 'C') C[a] = 1;
    if (chr == 'D') D[a] = 1;
  }
  for (int i = 1; i < 14; i++) {
    if (S[i] == 0) cout << "S " << i << endl;
    if (H[i] == 0) cout << "H " << i << endl;
    if (C[i] == 0) cout << "C " << i << endl;
    if (D[i] == 0) cout << "D " << i << endl;
  }
}
