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