object Main {
    def main(args: Array[String]) = {
        val in = io.Source.stdin.getLines.toList.tail
        val ans = "SHCD".flatMap(c => (1 to 13).map(c + " " + _)) diff in
        ans.foreach(println)
    }
}