#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[4][13] = {};
  for (int x = 0; x < n; x++) {
    string str;
    int number;
    cin >> str >> number;
  }
  string str2[4] = {"S", "H", "C", "D"};
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (a[i][j] == 1) continue;
      cout << str2[i] << " " << j + 1 << endl;
    }
  }
  return 0;
}
