#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string x;
  int y;
  int S[13];
  int H[13];
  int C[13];
  int D[13];
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    if (x == "S") {
      S[y - 1] = 1;
    } else if (x == "H") {
      H[y - 1] = 1;
    } else if (x == "C") {
      C[y - 1] = 1;
    } else {
      D[y - 1] = 1;
    }
  }
  for (int s = 0; s < 13; s++) {
    if (S[s] == 0) {
      cout << "S " << s + 1 << endl;
    }
  }
  for (int h = 0; h < 13; h++) {
    if (H[h] == 0) {
      cout << "H " << h + 1 << endl;
    }
  }
  for (int c = 0; c < 13; c++) {
    if (C[c] == 0) {
      cout << "C " << c + 1 << endl;
    }
  }
  for (int d = 0; d < 13; d++) {
    if (D[d] == 0) {
      cout << "D " << d + 1 << endl;
    }
  }
  return 0;
}
