process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on("data", (input) => {
  const array = input.split("\n");
  const answers = array.slice(1);
  const result = DEFS.map((val) => {
    return `${val} x ${count(answers, val)}`;
  }).join("\n");
  console.log(result);
});

const DEFS = ["AC", "WA", "TLE", "RE"];

const count = (array, value) => {
  return array.filter((val) => val === value).length;
};
