#include <bits/stdc++.h>
using namespace std;
typedef struct CARD {
  char type[5] = {'S', 'H', 'C', 'D', 0};
  int num[13] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
} cardS;
int main() {
  cardS cardS;
  char type;
  int card_num, max, count = 0;
  int hit[4][13] = {0};
  cin >> max;
  while (count < max) {
    cin >> type >> card_num;
    for (int i = 0; i < 4; i++) {
      if (cardS.type[i] == type) {
        for (int j = 0; j < 13; j++) {
          if (cardS.num[j] == card_num) {
            hit[i][j] = 1;
          }
        }
      }
    }
    count++;
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (hit[i][j] == 0) {
        cout << cardS.type[i] << ' ' << cardS.num[j] << endl;
      }
    }
  }
  return 0;
}
