object Main extends App {

    var N = scala.io.StdIn.readInt()
    var C0, C1, C2 ,C3 = 0
    for(i <- 1 to N) {
      io.StdIn.readLine() match {
        case "AC"  => C0 += 1 
        case "WA"  => C1 += 1
        case "TLE" => C2 += 1
        case "RE " => C3 += 1
      }
    }

    println("AC ×"  + C0)
    println("WA ×"  + C1)
    println("TLE ×" + C2)
    println("RE ×"  + C3)
}