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