#include <bits/stdc++.h>
using namespace std;
int main(void) {
  bool a[4][13];
  int n, b;
  char ch, mark[4] = {'S', 'H', 'C', 'D'};
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%c%d", &ch, &b);
    switch (ch) {
      case 'S':
        a[0][b] = true;
        break;
      case 'H':
        a[1][b] = true;
        break;
      case 'C':
        a[2][b] = true;
        break;
      case 'D':
        a[3][b] = true;
        break;
    }
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      if (a[i][j] == false) cout << mark[i] << " " << j << endl;
    }
  }
}
