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