#include <bits/stdc++.h>
using namespace std;
int main() {
  char ch;
  int n, m;
  bool ArrS[13], ArrC[13], ArrD[13], ArrH[13];
  for (int i = 1; i <= 13; i++) {
    ArrS[i] != false;
    ArrH[i] != false;
    ArrD[i] != false;
    ArrC[i] != false;
  }
  cin >> m;
  while (m-- > 0) {
    cin >> ch >> n;
    switch (ch) {
      case 'S':
        ArrS[n] = true;
        break;
      case 'C':
        ArrC[n] = true;
        break;
      case 'D':
        ArrD[n] = true;
        break;
      case 'H':
        ArrH[n] = true;
        break;
    }
  }
  for (int i = 1; i <= 13; i++) {
    if (ArrS[i] != true) cout << "S " << i << endl;
  }
  for (int i = 1; i <= 13; i++) {
    if (ArrH[i] != true) cout << "H " << i << endl;
  }
  for (int i = 1; i <= 13; i++) {
    if (ArrC[i] != true) cout << "C " << i << endl;
  }
  for (int i = 1; i <= 13; i++) {
    if (ArrD[i] != true) cout << "D " << i << endl;
  }
  return 0;
}
