object Main extends App {
  val deck = scala.io.Source.stdin.getLines.toList.tail
  (for (suit <- "SHCD"; n <- 1 to 13) yield suit + " " + n)
    .filter(x => deck.contains(x) == false)
    .map(println)
}