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