#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  array<bool, 52> flag;
  flag.fill(false);
  char Mark;
  int Number = 0;
  for (int i = 0; i < n; i++) {
    cin >> Mark >> Number;
    if (Mark == 'S') {
      flag[Number - 1] = true;
    } else if (Mark == 'H') {
      flag[Number + 12] = true;
    } else if (Mark == 'C') {
      flag[Number + 25] = true;
    } else if (Mark == 'D') {
      flag[Number + 38] = true;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (flag[i] == false) {
      cout << "S " << i + 1 << endl;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (flag[i + 13] == false) {
      cout << "H " << i + 1 << endl;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (flag[i + 26] == false) {
      cout << "C " << i + 1 << endl;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (flag[i + 39] == false) {
      cout << "S " << i + 1 << endl;
    }
  }
  return 0;
}
