#include <bits/stdc++.h>
using namespace std;
int main() {
  int S[13], H[13], C[13], D[13], N, num;
  char mark;
  cin >> N;
  for (int i = 0; i < N; i++) S[i] = 0, H[i] = 0, C[i] = 0, D[i] = 0;
  for (int i = 0; i < N; i++) {
    cin >> mark >> num;
    if (mark == 'S') S[num - 1] = 1;
    if (mark == 'H') H[num - 1] = 1;
    if (mark == 'C') C[num - 1] = 1;
    if (mark == 'D') D[num - 1] = 1;
  }
  for (int i = 0; i < 13; i++)
    if (S[i] == 0) cout << "S " << i + 1 << endl;
  for (int i = 0; i < 13; i++)
    if (H[i] == 0) cout << "H " << i + 1 << endl;
  for (int i = 0; i < 13; i++)
    if (C[i] == 0) cout << "C " << i + 1 << endl;
  for (int i = 0; i < 13; i++)
    if (D[i] == 0) cout << "D " << i + 1 << endl;
  return 0;
}
