let main = (input) => {
    let usrInput = input.split(/\n/)
    let uniqueArr = {}
    usrInput.map(function (item) {
        if (item in uniqueArr) {
            uniqueArr[item].count++
        } else {
            uniqueArr[item] = {
                key: item,
                count: 1
            }
        }
    })

    let ac = 0
    let wa = 0
    let tle = 0
    let re = 0
    for (let key in uniqueArr) {
        //console.log(uniqueArr[key].key + " x " + uniqueArr[key].count)
        switch (uniqueArr[key].key) {
            case "AC":
                ac = uniqueArr[key].count
                break;
            case "WA":
                wa = uniqueArr[key].count
                break;
            case "TLE":
                tle = uniqueArr[key].count
                break;
            case "RE":
                re = uniqueArr[key].count
                break;
            default:
                break;
        }
    }

    console.log("AC x " + ac)
    console.log("WA x " + wa)
    console.log("TLE x " + tle)
    console.log("RE x " + re)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))