import * as fs from "fs"
const inp:string[] = fs.readFileSync('/dev/stdin', 'utf8').trim().split('\n')

interface obj {
    AC: number,
    WA: number,
    TLE: number,
    RE: number
}

let obj:obj = {
    AC: 0,
    WA: 0,
    TLE: 0,
    RE: 0
}

inp.shift()
for (let element of inp){
    if (element === 'AC'){
        obj.AC += 1
    } else if (element === 'WA'){
        obj.WA += 1
    } else if (element === 'TLE'){
        obj.TLE += 1
    } else if (element === 'RE'){
        obj.RE += 1
    }
}
console.log(`AC × ${obj.AC}`)
console.log(`WA × ${obj.WA}`)
console.log(`TLE × ${obj.TLE}`)
console.log(`RE × ${obj.RE}`)
