fun main(args: Array<String>) {
    val symbolToIndex = mapOf("S" to 0, "H" to 1, "C" to 2, "D" to 3)
    val indexToSymbol = symbolToIndex.map { (k, v) -> v to k }.toMap()
    var cards = Array(4) {Array(13) {true} }

    val elementNum = readLine()!!.toInt()
    for (i in (1..elementNum)) {
        val (symbol, suit) = readLine()!!.split(" ")
        cards[symbolToIndex.getValue(symbol)][suit.toInt() - 1] = false
    }

    cards.forEachIndexed {
        index, suits -> suits.forEachIndexed {
            suit, v -> if (v) {println("${indexToSymbol.getValue(index)} ${suit + 1}")}
        }
    }
}

