#include <bits/stdc++.h>
using namespace std;
int main() {
  char ch;
  int n, m;
  bool ar[4][13];
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) ar[i][j] = false;
  }
  cin >> m;
  while (m-- > 0) {
    cin >> ch >> n;
    switch (ch) {
      case 'S':
        ar[0][n - 1] = true;
        break;
      case 'C':
        ar[2][n - 1] = true;
        break;
      case 'D':
        ar[3][n - 1] = true;
        break;
      case 'H':
        ar[1][n - 1] = true;
        break;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++)
      if (ar[i][j] == false) {
        if (i == 0)
          cout << "S ";
        else if (i == 1)
          cout << "H ";
        else if (i == 2)
          cout << "C ";
        else
          cout << "D ";
        cout << j + 1 << endl;
        ;
      }
  }
  cout << endl;
  return 0;
}
