(defun main ()
  (let* ((n (read))
	 (s (make-array n))
	 (ac 0)
	 (wa 0)
	 (tle 0)
	 (re 0))
    (dotimes (i n)
      (setf (aref s i) (read)))
    (setf ac (- n (length (remove 'ac s))))
    (setf wa (- n (length (remove 'wa s))))
    (setf tle (- n (length (remove 'tle s))))
    (setf re (- n ac wa tle))
    (format t "AC x ~a~%" ac)
    (format t "WA x ~a~%" wa)
    (format t "TLE x ~a~%" tle)
    (format t "RE x ~a~%" re)))
