#include <bits/stdc++.h>
using namespace std;
char mark[5] = "SHCD";
map<pair<char, int>, bool> m;
int main() {
  int N;
  scanf("%d", &N);
  for (int i = 0; i < N; ++i) {
    char a;
    int b;
    scanf("%c %d", &a, &b);
    m[pair<char, int>(a, b)] = true;
  }
  for (int i = 0; i < 4; ++i)
    for (int j = 1; j < 14; ++j) {
      if (!m[pair<char, int>(mark[i], j)]) printf("%c %d\n", mark[i], j);
    }
  return 0;
}
