val SUITS_LIST = arrayListOf("S","H","C","D")
val NUM_LIST   = arrayListOf(1..13)

fun main(args: Array<String>) {
    val n = readLine()?.toInt() ?: return
    val allCards : HashMap<String, Boolean> = hashMapOf()
    (1..n).forEach {
        val suitAndNum= readLine() ?: return
        allCards[suitAndNum] = true
    }
    val lostCards: ArrayList<String> = arrayListOf()
    SUITS_LIST.forEach{ suit ->
        NUM_LIST.forEach{ num ->
            val suitAndNum = "$suit $num"
            if(allCards[suitAndNum] == null) lostCards.add(suitAndNum)
        }
    }
    lostCards.forEach { suitAndNum ->
        println(suitAndNum)
    }
}


