#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, u, ii, iii, x;
  char c;
  bool cards[4][13];
  while (cin >> n) {
    cards[3][9] = false;
    cards[3][10] = false;
    cards[3][11] = false;
    cards[3][12] = false;
    cards[0][0] = false;
    cards[0][1] = false;
    cards[0][4] = false;
    for (i = 0; i < n; ++i) {
      cin >> c >> u;
      if (c == 'S') {
        cards[0][u - 1] = true;
      } else if (c == 'H') {
        cards[1][u - 1] = true;
      } else if (c == 'C') {
        cards[2][u - 1] = true;
      } else if (c == 'D') {
        cards[3][u - 1] = true;
      }
    }
    for (iii = 1; iii <= 13; ++iii) {
      if (cards[0][iii - 1] == false) {
        c = 'S';
        cout << c << " " << iii << endl;
      }
    }
    for (iii = 1; iii <= 13; ++iii) {
      if (cards[1][iii - 1] == false) {
        c = 'H';
        cout << c << " " << iii << endl;
      }
    }
    for (iii = 1; iii <= 13; ++iii) {
      if (cards[2][iii - 1] == false) {
        c = 'C';
        cout << c << " " << iii << endl;
      }
    }
    for (iii = 1; iii <= 13; ++iii) {
      if (cards[3][iii - 1] == false) {
        c = 'D';
        cout << c << " " << iii << endl;
      }
    }
  }
  return 0;
}
