#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
  int n;
  char m;
  int x;
  bool u[4][13];
  cin >> n;
  for (int(i) = 0; (i) < (int)(n); (i)++) {
    cin >> m;
    cin >> x;
    if (m == 'S') {
      u[0][x - 1] = true;
    } else if (m == 'H') {
      u[1][x - 1] = true;
    } else if (m == 'C') {
      u[2][x - 1] = true;
    } else {
      u[3][x - 1] = true;
    }
  }
  for (int(i) = 0; (i) < (int)(13); (i)++) {
    if (!u[0][i]) {
      cout << "S " << i + 1 << endl;
    }
  }
  for (int(i) = 0; (i) < (int)(13); (i)++) {
    if (!u[1][i]) {
      cout << "H " << i + 1 << endl;
    }
  }
  for (int(i) = 0; (i) < (int)(13); (i)++) {
    if (!u[2][i]) {
      cout << "C " << i + 1 << endl;
    }
  }
  for (int(i) = 0; (i) < (int)(13); (i)++) {
    if (!u[3][i]) {
      cout << "D " << i + 1 << endl;
    }
  }
}
