#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char yaku;
  int kazu;
  bool a[5][52] = {false};
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> yaku >> kazu;
    switch (yaku) {
      case 'S':
        a[0][kazu] = true;
        break;
      case 'H':
        a[1][kazu] = true;
        break;
      case 'K':
        a[2][kazu] = true;
        break;
      case 'D':
        a[3][kazu] = true;
        break;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      if (i == 0 && a[i][j] == false)
        cout << 'S' << " " << j << endl;
      else if (i == 1 && a[i][j] == false)
        cout << "H"
             << " " << j << endl;
      else if (i == 2 && a[i][j] == false)
        cout << 'K' << " " << j << endl;
      else if (i == 3 && a[i][j] == false)
        cout << 'K' << " " << j << endl;
    }
  }
  return 0;
}
