#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[4][13], n, i, k, j, x;
  char t;
  for (k = 0; k < 13; k++) {
    a[0][k] = 0;
    a[1][k] = 0;
    a[2][k] = 0;
    a[3][k] = 0;
  }
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> t >> x;
    if (t == 'S') {
      a[0][x] = 1;
    } else if (t == 'H') {
      a[1][x] = 1;
    } else if (t == 'C') {
      a[2][x] = 1;
    } else if (t == 'D') {
      a[3][x] = 1;
    }
  }
  for (j = 1; j <= 13; j++) {
    if (a[0][j] == false) {
      cout << "S"
           << " " << j << endl;
    }
  }
  for (j = 1; j <= 13; j++) {
    if (a[1][j] == false) {
      cout << "H"
           << " " << j << endl;
    }
  }
  for (j = 1; j <= 13; j++) {
    if (a[2][j] == false) {
      cout << "C"
           << " " << j << endl;
    }
  }
  for (j = 1; j <= 13; j++) {
    if (a[3][j] == false) {
      cout << "D"
           << " " << j << endl;
    }
  }
  return 0;
}
