fun main(args:Array<String>){
    val s : String = readLine().toString()
    val x : Int = s.length
    var ac = 0
    var wa = 0
    var tle = 0
    var re = 0

    for(i:Int in 0..x){
        if(i!=x && s[i]=='A' && s[i+1]=='C'){
            ac++
        }
        else if(i!=x && s[i]=='W' &&s [i+1]=='A'){
            wa++
        }
        else if(i!=x && s[i]=='T'&&s[i+1]=='L'&&s[i+2]=='E'){
            tle++

        }
        else if(i!=x && s[i]=='R'&&s[i+1]=='E'){
            re++
        }
    }
    println("AC × $ac")
    println("WA × $wa")
    println("TLE × $tle")
    println("RE × $re")
}