
AC_num=0
WA_num=0
TLE_num=0
RE_num=0

read num

for ((i = 1; i <= $num; i++))
do
	read str
	str[$i]="$str"
done


for ((i=1; i<${#str[@]}; i++))
do

	case "${str[$i]}" in
		"AC" )  AC_num=`expr $AC_num + 1`;;
		"WA" )  WA_num=`expr $WA_num + 1`;;
		"TLE" ) TLE_num=`expr $TLE_num + 1`;;
		"RE" )  RE_num=`expr $RE_num + 1`;;
	esac

done

echo "AC x $AC_num"
echo "WA x $WA_num"
echo "TLE x $TLE_num"
echo "RE x $RE_num"
