program abc2
 implicit none
 integer::N,i=0,x=0,ishotb=0,ishota=0,p=0,q=0,r=0,s=0
 read(*,*)N
 character'4)::a
 do ishotb=1,N
  read(*,*)a
  if(a(1:1)=="A")then
   p=p+1
  end if
  if(a(1:1)=="W")then
   q=q+1
  end if
  if(a(1:1)=="T")then
   r=r+1
  end if
  if(a(1:1)=="R")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