program main
implicit none
	integer(8)::n,i,ac,wa,tle,re
    character::ch
    ac=0
    wa=0
    tle=0
    re=0
    read(*,*) n
    do i=0,n-1
    	read(*,*) ch
        if (ch=='A')then
        	ac=ac+1
        else if (ch=='W')then
        	wa=wa+1
        else if (ch=='T')then
        	tle=tle+1
        else if (ch=='R')then
        	re=re+1
        end if
    end do
    write(*,*) 'AC x ',ac
    write(*,*) 'WA x ',wa
    write(*,*) 'TLE x ',tle
    write(*,*) 'RE x ',re
end program main
    