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