#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, input;
  long long S[14] = {0}, H[14] = {0}, C[14] = {0}, D[14] = {0};
  char m;
  cin >> n;
  for (long long i = 0; i < (n); i++) {
    cin >> m >> input;
    if (m == 'S')
      S[input] = 1;
    else if (m == 'H')
      H[input] = 1;
    else if (m == 'C')
      C[input] = 1;
    else if (m == 'D')
      D[input] = 1;
    else {
      cout << "error" << endl;
      break;
    }
  }
  for (long long i = (1); i < (13); i++) {
    if (S[i] == 0) cout << "S " << i << endl;
  }
  for (long long i = (1); i < (13); i++) {
    if (H[i] == 0) cout << "H " << i << endl;
  }
  for (long long i = (1); i < (13); i++) {
    if (C[i] == 0) cout << "C " << i << endl;
  }
  for (long long i = (1); i < (13); i++) {
    if (D[i] == 0) cout << "D " << i << endl;
  }
  return 0;
}
