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