#include <bits/stdc++.h>
using namespace std;
int main() {
  bool x[4][13];
  int number, n, i;
  char mark;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> mark >> number;
    x[mark][number] = 1;
  }
  cout << endl;
  for (i = 1; i <= 13; i++) {
    if (x['S'][i] == 0) {
      cout << "S " << i << endl;
    }
  }
  for (i = 1; i <= 13; i++) {
    if (x['H'][i] == 0) {
      cout << "H " << i << endl;
    }
  }
  for (i = 1; i <= 13; i++) {
    if (x['C'][i] == 0) {
      cout << "C " << i << endl;
    }
  }
  for (i = 1; i <= 13; i++) {
    if (x['D'][i] == 0) {
      cout << "D " << i << endl;
    }
  }
}
