const input = require("fs").readFileSync("/dev/stdin", "utf8")

;(input => {

    const lines = input.split('\n')
    const N = lines[0] - 0
    const S = lines

    const c = {AC: 0, WA: 0, TLE: 0, RE: 0}

    for (let i = 1; i <= N; i++) {
        c[S[i]]++
    }

    console.log('AC x ' + c.AC)
    console.log('WA x ' + c.WA)
    console.log('TLE x ' + c.TLE)
    console.log('RE x ' + c.RE)

})(input)
