#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  int dis;
  bool arr[52];
  cin >> n;
  for (size_t i = 0; i < n; i++) {
    char m;
    int num;
    cin >> m >> num;
    switch (m) {
      default:
        break;
      case 'S':
        num += 0;
        break;
      case 'H':
        num += 13;
        break;
      case 'C':
        num += 26;
        break;
      case 'D':
        num += 36;
        break;
    }
    arr[num--] = true;
  }
  for (size_t i = 0; i < 52; i++) {
    if (!arr[i]) {
      switch (i / 13) {
        default:
          break;
        case 0:
          cout << "S ";
          break;
        case 1:
          cout << "H ";
          break;
        case 2:
          cout << "C ";
          break;
        case 3:
          cout << "D ";
          break;
      }
      cout << (i % 13) + 1 << endl;
    }
  }
  return 0;
}
