#include <bits/stdc++.h>
using namespace std;
int main() {
  int cards[4][13];
  int n_given;
  cin >> n_given;
  char type;
  int number;
  int kind;
  for (int i = 0; i < n_given; i++) {
    cin >> type >> number;
    if (type == 'S') {
      kind = 0;
    } else if (type == 'H') {
      kind = 1;
    } else if (type == 'C') {
      kind = 2;
    } else {
      kind = 3;
    }
    cards[kind][number - 1] = 1;
  }
  char kinds[4] = {'S', 'H', 'C', 'D'};
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (cards[i][j] != 1) {
        cout << kinds[i] << ' ' << j + 1 << endl;
      }
    }
  }
  return 0;
}
