#include <bits/stdc++.h>
using namespace std;
int main() {
  bool s[13];
  bool h[13];
  bool c[13];
  bool d[13];
  int n;
  cin >> n;
  for (int i = 0; i < 13; i++) {
    s[i] = 0;
    d[i] = 0;
    c[i] = 0;
    d[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    char x;
    int y;
    cin >> x >> y;
    switch (x) {
      case 'S':
        s[y - 1] = 1;
        break;
      case 'H':
        h[y - 1] = 1;
        break;
      case 'C':
        c[y - 1] = 1;
        break;
      case 'D':
        d[y - 1] = 1;
        break;
    }
  }
  for (int i = 0; i < 13; i++) {
    if (s[i] == 0) cout << "S " << i + 1 << endl;
  }
  for (int i = 0; i < 13; i++) {
    if (h[i] == 0) cout << "H " << i + 1 << endl;
  }
  for (int i = 0; i < 13; i++) {
    if (c[i] == 0) cout << "C " << i + 1 << endl;
  }
  for (int i = 0; i < 13; i++) {
    if (d[i] == 0) cout << "D " << i + 1 << endl;
  }
  return 0;
}
