<?php
fscanf(STDIN,"%d",$n);
$count_case['AC'] = 0;
$count_case['WA'] = 0;
$count_case['TLE'] = 0;
$count_case['RE'] = 0;



for($i=0;$i<$n;$i++){
  fscanf(STDIN,"%s",$s);
  $count_case[$s]++;
}

//print_r($count_case);

foreach($count_case as $re => $count){
  echo $re." × ".$count."\n";
}