program abc2
 implicit none
 character(len=3),allocatable::t(:)
 integer::N,ishotb=0,ishota=0,p=0,q=0,r=0,s=0
 read(*,*)N
 allocate(t(N))
 do ishotb=1,N
  read(*,*)t(ishotb)
 end do
 do ishota=1,N
  if(t(ishota)=="AC ")then
   p=p+1
  end if
  if(t(ishota)=="WA ")then
   q=q+1
  end if
  if(t(ishota)=="TLE")then
   r=r+1
  end if
  if(t(ishota)=="RE ")then
   s=s+1
  end if
 end do
 print'(a,i0)',"AC×",p
 print'(a,i0)',"WA×",q
 print'(a,i0)',"TLE×",r
 print'(a,i0)',"RE×",s
end program abc2