#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  bool card[4][13] = {};
  string type;
  int num;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      card[i][j] = false;
    }
  }
  for (int i = 0; i < n; i++) {
    cin >> type >> num;
    if (type == "S" || type == "s") {
      card[0][num - 1] = num;
    } else if (type == "H" || type == "h") {
      card[1][num - 1] = num;
    } else if (type == "C" || type == "c") {
      card[2][num - 1] = num;
    } else if (type == "D" || type == "d") {
      card[3][num - 1] = num;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (card[i][j] == false) {
        if (i == 0) {
          cout << "S" << j + 1 << endl;
        } else if (i == 1) {
          cout << "H" << j + 1 << endl;
        } else if (i == 2) {
          cout << "C" << j + 1 << endl;
        } else if (i == 3) {
          cout << "D" << j + 1 << endl;
        }
      }
    }
  }
  return 0;
}
