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