#include <bits/stdc++.h>
using namespace std;
int main() {
  bool a[4][14];
  int n, b;
  char ch, mark[4] = {'S', 'H', 'C', 'D'};
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> ch >> b;
    if (ch == 'S')
      a[0][b] = true;
    else if (ch == 'H')
      a[1][b] = true;
    else if (ch == 'C')
      a[2][b] = true;
    else if (ch == 'D')
      a[3][b] = true;
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      if (a[i][j] == false) cout << mark[i] << " " << j << endl;
    }
  }
  return 0;
}
