#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  bool S[14];
  bool H[14];
  bool C[14];
  bool D[14];
  for (int i = 0; i < n; i++) {
    char c;
    int num;
    cin >> c >> num;
    if (c == 'S')
      S[num] = true;
    else if (c == 'H')
      H[num] = true;
    else if (c == 'C')
      C[num] = true;
    else if (c == 'D')
      D[num] = true;
  }
  for (int i = 1; i <= 13; i++)
    if (S[i] != true) cout << "S " << i << endl;
  for (int i = 1; i <= 13; i++)
    if (H[i] != true) cout << "H " << i << endl;
  for (int i = 1; i <= 13; i++)
    if (C[i] != true) cout << "C " << i << endl;
  for (int i = 1; i <= 13; i++)
    if (D[i] != true) cout << "D " << i << endl;
}
