#include <bits/stdc++.h>
using namespace std;
int main() {
  bool card[4][13];
  char a;
  int n = 0, b = 0, f = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a == 'S') f = 1;
    if (a == 'H') f = 2;
    if (a == 'C') f = 3;
    if (a == 'D') f = 4;
    cin >> b;
    card[f][b] = 1;
  }
  for (int j = 1; j <= 4; j++) {
    for (int k = 1; k <= 13; k++) {
      if (card[j][k] != 1) {
        if (j == 1) cout << "S " << k << endl;
        if (j == 2) cout << "H " << k << endl;
        if (j == 3) cout << "C " << k << endl;
        if (j == 4) cout << "D " << k << endl;
      }
    }
  }
}
