#include <bits/stdc++.h>
int main() {
  int N[4][14] = {0};
  char O[53];
  int A[53];
  int n, i, j, k;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%c %d\n", &O[i], &A[i]);
    switch (O[i]) {
      case 'S':
        N[0][A[i]] = A[i];
        break;
      case 'H':
        N[1][A[i]] = A[i];
        break;
      case 'C':
        N[2][A[i]] = A[i];
        break;
      case 'D':
        N[3][A[i]] = A[i];
        break;
    }
  }
  for (j = 0; j <= 3; j++) {
    switch (j) {
      case 0:
        for (k = 0; k <= 12; k++) {
          if (N[j][k] == 0) {
            printf("%c %d\n", 'S', k + 1);
          }
        }
        break;
      case 1:
        for (k = 1; k <= 13; k++) {
          if (N[j][k] == 0) {
            printf("%c %d\n", 'H', k + 1);
          }
        }
        break;
      case 2:
        for (k = 1; k <= 13; k++) {
          if (N[j][k] == 0) {
            printf("%c %d\n", 'C', k + 1);
          }
        }
        break;
      case 3:
        for (k = 1; k <= 13; k++) {
          if (N[j][k] == 0) {
            printf("%c %d\n", 'D', k + 1);
          }
        }
        break;
    }
  }
  return 0;
}
