fun main (args:Array<String>){
    val testCase = readLine()!!.toInt()
    var judgeCountMap = mutableMapOf<String, Int>()
    judgeCountMap["AC"] = 0
    judgeCountMap["WA"] = 0
    judgeCountMap["TLE"] = 0
    judgeCountMap["RE"] = 0

    for (i in 1..testCase){
        val judge = readLine()!!
        judgeCountMap[judge] = judgeCountMap[judge]!!.inc()
    }

    println("AC x ${judgeCountMap["AC"]}")
    println("WA x ${judgeCountMap["WA"]}")
    println("TLE x ${judgeCountMap["TLE"]}")
    println("RE x ${judgeCountMap["RE"]}")
}
