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