#include <bits/stdc++.h>
int main() {
  char a[3], c;
  a[0] = 'S';
  a[1] = 'H';
  a[2] = 'C';
  a[3] = 'D';
  int b, n[3][13] = {}, u;
  scanf("%d", &b);
  for (int i = 1; i < b + 1; i++) {
    scanf("%c %d", &c, &u);
    if (c == 'S')
      n[0][u] = 1;
    else if (c == 'H')
      n[1][u] = 1;
    else if (c == 'C')
      n[2][u] = 1;
    else if (c == 'D')
      n[3][u] = 1;
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 1; j < 14; j++) {
      if (n[i][j] == 0) printf("%c %d", a[i], j);
    }
  }
  return 0;
}
