fun main(args:Array<String>) {
    val n = readLine()!!.toInt()
    val list = Array(n) { readLine()!! }

    fun pl(v:String) = println("$v x ${list.count{it == v}}")

    pl("AC")
    pl("WA")
    pl("TLE")
    pl("RE")
}