#include <bits/stdc++.h>
using namespace std;
int n;
bool list[4][13];
vector<int> v;
map<char, int> m;
int main() {
  m['S'] = 0;
  m['H'] = 1;
  m['C'] = 2;
  m['D'] = 3;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int num;
    char c;
    cin >> c >> num;
    num--;
    list[m[c]][num] = true;
  }
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 13;) {
      if (!list[i][j]) {
        char c = 'z';
        switch (i) {
          case 0:
            c = 'S';
            break;
          case 1:
            c = 'H';
            break;
          case 2:
            c = 'C';
            break;
          default:
            c = 'D';
            break;
        }
        cout << c << " " << j + 1 << endl;
      }
    }
  }
  return 0;
}
