#include<bits/stdc++.h>
using namespace std;

int main(void)
{
  int i,j;
  int ac,tle,wa,re;
  ac =0; tle =0; wa =0; re =0;
  cin >> i;
  string d[i];
  for(j=0; j<i;j++){
   cin >> d[i];
  }
  for(int k=0;k<i;k++){
    if(d[k] == "AC"){ ac++;
    }
    else if(d[k] == "WA"){
     wa++;
    }
    else if(d[k] == "TLE"){
     tle++:
    }
    else if(d[k] == "re"){
     re++:
    }
    print("AC × %d\n",ac);
    print("WA × %d\n",wa);
    print("TLE × %d\n",tle);
    print("RE × %d\n",re);
  }
