#include <bits/stdc++.h>
using namespace std;
void WriteSol(bool cards[14], char letter) {
  for (int i = 1; i < 14; i++)
    if (cards[i] == false) cout << letter << " " << i << endl;
}
int main() {
  bool cardS[14];
  bool cardH[14];
  bool cardC[14];
  bool cardD[14];
  int n;
  char rank_card;
  int num_card;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> rank_card >> num_card;
    switch (rank_card) {
      case 'S': {
        cardS[num_card] = true;
        break;
      }
      case 'H': {
        cardH[num_card] = true;
        break;
      }
      case 'D': {
        cardD[num_card] = true;
        break;
      }
      case 'C': {
        cardC[num_card] = true;
        break;
      }
    }
  }
  WriteSol(cardS, 'S');
  WriteSol(cardH, 'H');
  WriteSol(cardC, 'C');
  WriteSol(cardD, 'D');
  return 0;
}
