program main
	implicit none
	integer(8):: N,i,j1=0,j2=0,j3=0,j4=0,t,k
	character(200000):: S
	read *, N
	do i=1,N
	read *,S
	if(S=="AC")j1=1+j1
	if(S=="WA")j2=1+j2
	if(S=="TLE")j3=1+j3
	if(S=="RE")j4=1+j4    
	end do
	write(*,*)"AC×",j1
	write(*,*)"WA×",j2
	write(*,*)"TLE×",j3
	write(*,*)"RE×",j4
	end program main