#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char x;
  int r;
  int a[4][13];
  int i, j;
  for (int g = 0; g < n; g++) {
    cin >> x >> r;
    if (x == 'S') i = 0;
    if (x == 'H') i = 1;
    if (x == 'C') i = 2;
    if (x == 'D') i = 3;
    j = r - 1;
    a[i][j] = true;
  }
  for (int t = 0; t < 13; t++) {
    if (a[0][t] == false) cout << 'S' << ' ' << t + 1 << endl;
  }
  for (int u = 0; u < 13; u++) {
    if (a[1][u] == false) cout << 'H' << ' ' << u + 1 << endl;
  }
  for (int v = 0; v < 13; v++) {
    if (a[2][v] == false) cout << 'C' << ' ' << v + 1 << endl;
  }
  for (int w = 0; w < 13; w++) {
    if (a[3][w] == false) cout << 'D' << ' ' << w + 1 << endl;
  }
  return 0;
}
