fun main(args: Array<String>) {
    val N = readLine()!!.toInt()
    val S = (1..N).map { readLine()!! }
    println("AC x ${S.count { it == "AC" }}")
    println("WA x ${S.count { it == "WA" }}")
    println("TLE x ${S.count { it == "TLE" }}")
    println("RE x ${S.count { it == "RE" }}")
}