const readline = require('readline');

const verdictCounter = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0};

async function processLineByLine() {
  const rl = readline.createInterface({
    input: process.stdin,
    crlfDelay: Infinity
  });
  for await (const line of rl) {
    if ( Object.keys(verdictCounter).includes(line) ) {
      verdictCounter[line]++
    }
  }
  for (let key in verdictCounter) {
    console.log(`${key} x ${verdictCounter[key]}`)
  }
}

processLineByLine();