#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int i;
  int Slank[13] = {0}, Hlank[13] = {0}, Clank[13] = {0}, Dlank[13] = {0};
  cin >> n;
  char mark[n];
  int lank[n];
  for (i = 0; i < n; i++) {
    cin >> mark[i] >> lank[i];
    if (mark[i] == 'S')
      Slank[lank[i] - 1] = lank[i];
    else if (mark[i] == 'H')
      Hlank[lank[i] - 1] = lank[i];
    else if (mark[i] == 'C')
      Clank[lank[i] - 1] = lank[i];
    else if (mark[i] == 'D')
      Dlank[lank[i] - 1] = lank[i];
  }
  cout << endl;
  for (i = 0; i < 13; i++) {
    if (Slank[i] == 0) cout << 'S' << ' ' << i + 1 << endl;
  }
  for (i = 0; i < 13; i++) {
    if (Hlank[i] == 0) cout << 'H' << ' ' << i + 1 << endl;
  }
  for (i = 0; i < 13; i++) {
    if (Clank[i] == 0) cout << 'C' << ' ' << i + 1 << endl;
  }
  for (i = 0; i < 13; i++) {
    if (Dlank[i] == 0) cout << 'D' << ' ' << i + 1 << endl;
  }
  return 0;
}
