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