#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, r, cards[4][13] = {0};
  char m, marks[4] = {'S', 'H', 'C', 'D'};
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%s %d", &m, &r);
    if (m == marks[0]) {
      cards[0][r - 1] = 1;
    }
    if (m == marks[1]) {
      cards[1][r - 1] = 1;
    }
    if (m == marks[2]) {
      cards[2][r - 1] = 1;
    }
    if (m == marks[3]) {
      cards[3][r - 1] = 1;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 13; j++) {
      if (cards[i][j] == 0) {
        printf("%c %d\n", marks[i], j + 1);
      }
    }
  }
  return 0;
}
