#include <bits/stdc++.h>
using namespace std;
int main() {
  int card[51] = {0};
  int total, number;
  char type;
  cin >> total;
  for (int i = 0; i < total; i++) {
    cin >> type >> number;
    if (type == 'S') {
      card[number - 1] = {1};
    }
    if (type == 'H') {
      card[number + 12] = {1};
    }
    if (type == 'C') {
      card[number + 25] = {1};
    }
    if (type == 'D') {
      card[number + 38] = {1};
    }
  }
  for (int i = 0; i < 52; i++) {
    if (card[i] == 0) {
      if (i < 13) {
        cout << "S"
             << " " << i + 1 << endl;
      }
      if (i >= 13 && i < 26) {
        cout << "H"
             << " " << i - 12 << endl;
      }
      if (i >= 26 && i < 39) {
        cout << "C"
             << " " << i - 25 << endl;
      }
      if (i >= 39 && i < 52) {
        cout << "D"
             << " " << i - 38 << endl;
      }
    }
  }
}
