import java.util.*;
import java.io.*;
public class Main{
 public static void main(String agrs[])
 {
   Scanner in = new Scanner(System.in);
   PrintWriter out = new PrintWriter(System.out);
   int n = Integer.parseInt(in.nextLine());
   int a = 0;
   int b = 0; 
   int c = 0;
   int d = 0;
   for(int i = 0; i < n; i++)
   {
     String temp = in.nextLine();
     if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     }
   }
   out.println("AC x " + a);
   out.println("WA x " + b);
	out.println("TLE x " + c);
	out.println("RE x " + d);
   out.close();
 }
} import java.util.*; util.* java import java.io.*; io.* java public class Main{
 public static void main(String agrs[])
 {
   Scanner in = new Scanner(System.in);
   PrintWriter out = new PrintWriter(System.out);
   int n = Integer.parseInt(in.nextLine());
   int a = 0;
   int b = 0; 
   int c = 0;
   int d = 0;
   for(int i = 0; i < n; i++)
   {
     String temp = in.nextLine();
     if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     }
   }
   out.println("AC x " + a);
   out.println("WA x " + b);
	out.println("TLE x " + c);
	out.println("RE x " + d);
   out.close();
 }
} Main public static void main(String agrs[])
 {
   Scanner in = new Scanner(System.in);
   PrintWriter out = new PrintWriter(System.out);
   int n = Integer.parseInt(in.nextLine());
   int a = 0;
   int b = 0; 
   int c = 0;
   int d = 0;
   for(int i = 0; i < n; i++)
   {
     String temp = in.nextLine();
     if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     }
   }
   out.println("AC x " + a);
   out.println("WA x " + b);
	out.println("TLE x " + c);
	out.println("RE x " + d);
   out.close();
 } main {
   Scanner in = new Scanner(System.in);
   PrintWriter out = new PrintWriter(System.out);
   int n = Integer.parseInt(in.nextLine());
   int a = 0;
   int b = 0; 
   int c = 0;
   int d = 0;
   for(int i = 0; i < n; i++)
   {
     String temp = in.nextLine();
     if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     }
   }
   out.println("AC x " + a);
   out.println("WA x " + b);
	out.println("TLE x " + c);
	out.println("RE x " + d);
   out.close();
 } Scanner in = new Scanner(System.in); in new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) int n = Integer.parseInt(in.nextLine()); n Integer.parseInt(in.nextLine()) Integer.parseInt Integer in.nextLine() in.nextLine in int a = 0; a 0 int b = 0; b 0 int c = 0; c 0 int d = 0; d 0 for(int i = 0; i < n; i++)
   {
     String temp = in.nextLine();
     if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     }
   } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
     String temp = in.nextLine();
     if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     }
   } {
     String temp = in.nextLine();
     if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     }
   } String temp = in.nextLine(); temp in.nextLine() in.nextLine in if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     } temp.equals("AC") temp.equals temp "AC" {
      	a++; 
     } a++ a if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     } temp.equals("WA") temp.equals temp "WA" {
      	b++; 
     } b++ b if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     } temp.equals("TLE") temp.equals temp "TLE" {
       c++;
     } c++ c {
       d++;
     } d++ d out.println("AC x " + a) out.println out "AC x " + a "AC x " a out.println("WA x " + b) out.println out "WA x " + b "WA x " b out.println("TLE x " + c) out.println out "TLE x " + c "TLE x " c out.println("RE x " + d) out.println out "RE x " + d "RE x " d out.close() out.close out String agrs[] agrs public class Main{
 public static void main(String agrs[])
 {
   Scanner in = new Scanner(System.in);
   PrintWriter out = new PrintWriter(System.out);
   int n = Integer.parseInt(in.nextLine());
   int a = 0;
   int b = 0; 
   int c = 0;
   int d = 0;
   for(int i = 0; i < n; i++)
   {
     String temp = in.nextLine();
     if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     }
   }
   out.println("AC x " + a);
   out.println("WA x " + b);
	out.println("TLE x " + c);
	out.println("RE x " + d);
   out.close();
 }
} public class Main{
 public static void main(String agrs[])
 {
   Scanner in = new Scanner(System.in);
   PrintWriter out = new PrintWriter(System.out);
   int n = Integer.parseInt(in.nextLine());
   int a = 0;
   int b = 0; 
   int c = 0;
   int d = 0;
   for(int i = 0; i < n; i++)
   {
     String temp = in.nextLine();
     if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     }
   }
   out.println("AC x " + a);
   out.println("WA x " + b);
	out.println("TLE x " + c);
	out.println("RE x " + d);
   out.close();
 }
} Main
import java.util.*;
import java.io.*;
public class Main{
 public static void main(String agrs[])
 {
   Scanner in = new Scanner(System.in);
   PrintWriter out = new PrintWriter(System.out);
   int n = Integer.parseInt(in.nextLine());
   int a = 0;
   int b = 0; 
   int c = 0;
   int d = 0;
   for(int i = 0; i < n; i++)
   {
     String temp = in.nextLine();
     if(temp.equals("AC"))
     {
      	a++; 
     }
     else if(temp.equals("WA"))
     {
      	b++; 
     }
     else if(temp.equals("TLE"))
     {
       c++;
     }
     else
     {
       d++;
     }
   }
   out.println("AC x " + a);
   out.println("WA x " + b);
	out.println("TLE x " + c);
	out.println("RE x " + d);
   out.close();
 }
}