#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, number;
  cin >> n;
  int card[4][13] = {0};
  char mark;
  for (int i = 0; i < n; i++) {
    cin >> mark >> number;
    switch (mark) {
      case 'S':
        card[0][number - 1] = 1;
      case 'H':
        card[0][number - 1] = 1;
      case 'C':
        card[0][number - 1] = 1;
      case 'D':
        card[0][number - 1] = 1;
    }
  }
  for (int k = 0; k < 13; k++) {
    if (card[0][k] = 0) cout << 'S' << " " << k + 1 << endl;
  }
  for (int k = 0; k < 13; k++) {
    if (card[1][k] = 0) cout << 'H' << " " << k + 1 << endl;
  }
  for (int k = 0; k < 13; k++) {
    if (card[2][k] = 0) cout << 'C' << " " << k + 1 << endl;
  }
  for (int k = 0; k < 13; k++) {
    if (card[3][k] = 0) cout << 'D' << " " << k + 1 << endl;
  }
  return 0;
}
