#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007;
const long long int INF = (long long int)1e15;
char M[4] = {'S', 'H', 'C', 'D'};
struct Card {
  int N[4] = {0, 0, 0, 0};
};
Card C[15];
int main() {
  int N;
  for (long long int n = (long long int)(0); n < (long long int)(N); ++n) {
    int c;
    char m;
    cin >> m >> c;
    for (long long int i = (long long int)(0); i < (long long int)(4); ++i) {
      if (M[i] == m) {
        C[c - 1].N[i]++;
        break;
      }
    }
  }
  for (long long int c = (long long int)(0); c < (long long int)(13); ++c) {
    for (long long int m = (long long int)(0); m < (long long int)(4); ++m) {
      if (C[c].N[m] == 0) {
        cout << M[m] << " " << c + 1 << endl;
      }
    }
  }
  return 0;
}
