program testcase
    integer n, i
    character str
    integer :: ac = 0
    integer :: tle = 0
    integer :: wa = 0
    integer :: re = 0
    character, allocatable :: s(:)
    read *, n
    allocate (s(n))
    do i = 1, n
        read *, str
        if(str == 'AC')then
            ac = ac + 1
        else if(str == 'WA')then
            wa = wa + 1
        else if(str == 'RE')then
            re = re + 1
        else if(str == 'TLE')then
            tle = tle + 1
        end if
    end do
    print *, 'AC ×', ac
    print *, 'WA ×', wa
    print *, 'RE ×', re
    print *, 'TLE ×', tle
end program