#include<iostream>
#include<string>
#include<cstdio>
using namespace std;

int main(){
  int n, tgt, card[52] = {};
  int num;
  string soot;
  cin >> n;
  for (int i = 0; i < n; i++) {
    tgt = -1;
    cin >> soot >> num;
    if (soot == "S") {
      tgt += 0;
    } else if (soot == "H") {
      tgt += 13;
    } else if (soot == "C") {
      tgt += 13 * 2;
    } else if (soot == "D") {
      tgt += 13 * 3;
    }
    tgt += num;
    card[tgt] = 1;
  }
  for (int i = 0; i < 52; i++) {
    if (card[i] == 0) {
      switch (i / 13) {
        case 0:
          cout << "S " << i % 13 << endl;
          break;
        case 1:
          cout << "H " << i % 13 << endl;
          break;
        case 2:
          cout << "C " << i % 13 << endl;
          break;
        case 3:
          cout << "D " << i % 13 << endl;
          break;
        default;
      }
    } 
  }
}