#include <bits/stdc++.h>
using namespace std;
int main() {
  int total, num;
  char mark, marks[4] = {'S', 'H', 'C', 'D'};
  int a[4][13];
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; i < 13; ++j) {
      a[i][j] = 0;
    }
  }
  cin >> total;
  for (int i = 0; i < total; ++i) {
    cin >> mark >> num;
    switch (mark) {
      case 'S':
        a[0][num] = 1;
        break;
      case 'H':
        a[1][num] = 1;
        break;
      case 'C':
        a[2][num] = 1;
        break;
      case 'D':
        a[3][num] = 1;
        break;
    }
  }
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 13; ++j) {
      if (a[i][j] == 0) {
        printf("%c %d", marks[i], j + 1);
      }
    }
  }
  return 0;
}
