#!/bin/bash

read num

for ((i = 1; i <= $num; i++))
do
	read str
	echo $str >> tmp.txt
done


echo "AC x `grep AC tmp.txt | wc -l`"
echo "WA x `grep WA tmp.txt | wc -l`"
echo "TLE x `grep TLE tmp.txt | wc -l`"
echo "RE x `grep RE tmp.txt | wc -l`"
