#include <bits/stdc++.h>
using namespace std;
int main() {
  int s[13];
  int h[13];
  int c[13];
  int d[13];
  int n, m;
  char cr;
  for (int i = 1; i <= 13; i++) s[i] = 0;
  for (int i = 1; i <= 13; i++) h[i] = 0;
  for (int i = 1; i <= 13; i++) c[i] = 0;
  for (int i = 1; i <= 13; i++) d[i] = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> cr >> m;
    switch (cr) {
      case 'S':
        s[m] = 1;
        break;
      case 'H':
        h[m] = 1;
        break;
      case 'C':
        c[m] = 1;
        break;
      case 'D':
        d[m] = 1;
        break;
    }
  }
  for (int i = 1; i <= 13; i++)
    if (s[i] == 0) cout << 'S' << ' ' << i << endl;
  for (int i = 1; i <= 13; i++)
    if (h[i] == 0) cout << 'H' << ' ' << i << endl;
  for (int i = 1; i <= 13; i++)
    if (c[i] == 0) cout << 'C' << ' ' << i << endl;
  for (int i = 1; i <= 13; i++)
    if (d[i] == 0) cout << 'D' << ' ' << i << endl;
}
