#include <bits/stdc++.h>
using namespace std;
const string SUITS = "SHCD";
int suit2int(char);
char int2suit(int);
int main(void) {
  int n;
  cin >> n;
  string card[4][13];
  bool ck[4][13];
  char suit;
  int rank;
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      ck[i][j] = false;
      string blank = " ";
      card[i][j] = int2suit(i) + blank + to_string(j + 1);
    }
  }
  for (int i = 0; i < n; i++) {
    cin >> suit >> rank;
    ck[suit2int(suit)][rank - 1] = true;
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (!ck[i][j]) {
        cout << card[i][j] << endl;
      }
    }
  }
  return 0;
}
int suit2int(char suit) { return (int)SUITS.find(suit); }
char int2suit(int i) { return SUITS[i]; }
