val SUITS_LIST = arrayListOf("S","H","C","D")
val NUM_LIST   = arrayListOf(1,2,3,4,5,6,7,8,9,10,11,12,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)
    }
}


