#include <bits/stdc++.h>
using namespace std;
struct Card {
  char c;
  int v;
};
Card A[52];
int B[53] = {0};
int main() {
  int n;
  int k;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> A[i].c >> A[i].v;
    switch (A[i].c) {
      case 'S':
        k = 13 * 0;
        break;
      case 'H':
        k = 13 * 1;
        break;
      case 'C':
        k = 13 * 2;
        break;
      case 'D':
        k = 13 * 3;
        break;
    }
    k += A[i].v;
    B[k] = 1;
  }
  for (int i = 1; i < 53; ++i) {
    if (B[i] == 0) {
      if (i <= 1 && i <= 13) {
        cout << "S " << i << endl;
      } else if (13 < i && i <= 26) {
        cout << "H " << (i + 1) % 14 << endl;
      } else if (26 < i && i <= 39) {
        cout << "C " << (i + 2) % 14 << endl;
      } else {
        cout << "D " << (i + 3) % 14 << endl;
      }
    }
  }
}
