process.stdin.resume();
process.stdin.setEncoding("utf8");

const reader = require("readline").createInterface({
  input: process.stdin,
  output: process.stdout,
});

const l = [];

reader.on("line", (line) => {
  l.push(line);
});

reader.on("close", () => {
  let f = () => Array(13).fill(1);
  let o = {
    S: f(),
    H: f(),
    C: f(),
    D: f(),
  };

  let n = Number(l[0]);
  for (let i = 1; i <= n; i++) {
    let [M, N] = l[i].split(" ");
    o[M][Number(N) - 1] = 0;
  }
  let p = (m) => o[m].forEach((e, i) => e && console.log(`${m} ${i + 1}`));
  p("S");
  p("H");
  p("C");
  p("D");
});

