#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int cards[4][13];
  int counter = 0;
  char type;
  int number;
  while (1) {
    if (counter == n) break;
    cin >> type >> number;
    if (type == 'S') {
      cards[0][number - 1] = 1;
    } else if (type == 'H') {
      cards[1][number - 1] = 1;
    } else if (type = 'C') {
      cards[2][number - 1] = 1;
    } else {
      cards[3][number - 1] = 1;
    }
    counter++;
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (cards[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 << "\n";
      }
    }
  }
  cout << endl;
  return 0;
}
