fun main(args: Array<String>) {
    val suitList = listOf<String>("S", "H", "C", "D")

    var fullSet = mutableListOf<String>()
    for (s in suitList) {
        for (n in 1..13) {
            fullSet.add("%s %d".format(s, n))
        }
    }

    val inStr = readLine() ?: return
    val n = inStr.toInt()

    var inputList = mutableListOf<String>()
    for (i in 1..n) {
        val card = readLine() ?: ""
        inputList.add(card)
    }

    val lostList = fullSet.subtract(inputList)

    for (card in lostList) {
        println(card)
    }
}

