#include <bits/stdc++.h>
int main() {
  int n, m;
  int x[5][13];
  n = 1;
  m = 1;
  int l;
  while (n <= 4) {
    while (m <= 13) {
      l = m;
      x[n][m] = 0;
      m = l + 1;
    }
    m = 1;
    n++;
  }
  scanf("%d", &m);
  n = 1;
  char s;
  int t;
  int u;
  while (n <= m) {
    scanf("%c", &s);
    scanf("%d", &t);
    switch (s) {
      case ('S'):
        u = 1;
        break;
      case ('H'):
        u = 2;
        break;
      case ('C'):
        u = 3;
        break;
      case ('D'):
        u = 4;
        break;
    }
    x[u][t] = 1;
  }
  while (n <= 4) {
    while (m <= 13) {
      if (x[n][m] == 0) {
        switch (n) {
          case (1):
            s = 'S';
            break;
          case (2):
            s = 'H';
            break;
          case (3):
            s = 'C';
            break;
          case (4):
            s = 'D';
            break;
        }
        printf("%c %d", s, m);
      }
      m++;
    }
    m = 1;
    n++;
  }
  return 0;
}
