main :: IO ()
main = do
  sn <- getContents
  
  let s = lines sn
  let ac = length $ filter (== "AC") s
  let wa = length $ filter (== "WA") s
  let tle = length $ filter (== "TLE") s
  let re = length $ filter (== "RE") s
  
  putStr "AC x "
  print ac
  putStr "WA x "
  print wa
  putStr "TLE x "
  print tle
  putStr "RE x "
  print re