#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 13;
const char* const LANK = "SHCD";
int main() {
  int n, a, inx;
  char b;
  bool cards[4][MAX_N];
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> b >> a;
    if (b == 'S')
      inx = 0;
    else if (b == 'H')
      inx = 1;
    else if (b == 'C')
      inx = 2;
    else if (b == 'D')
      inx = 3;
    cards[inx][a - 1] = 1;
  }
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < MAX_N; ++j) {
      if (cards[i][j] == 0) cout << LANK[i] << " " << j + 1 << endl;
    }
  }
}
