/*input
5 5 2 3



*/
import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
 {
 static Scanner in = new Scanner(System.in);
 
 
 
 
    public static void solve()
    {   
        int n=in.nextInt();
        int ac=0,wa=0,tle=0,re=0;
        in.nextLine();
        for(int i=0;i<n;i++)
        {
            String s=in.nextLine();
            if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++;
            
        }
        
        System.out.println("AC x "+ac);
        System.out.println("WA x "+wa);
        System.out.println("TLE x "+tle);
        System.out.println("RE x "+re);
    	
    	
    }
    
	public static void main (String[] args)
	 {
	 int t=1;
	 while(t-->0)
	 {
	  solve();
	 }
}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main
 {
 static Scanner in = new Scanner(System.in);
 
 
 
 
    public static void solve()
    {   
        int n=in.nextInt();
        int ac=0,wa=0,tle=0,re=0;
        in.nextLine();
        for(int i=0;i<n;i++)
        {
            String s=in.nextLine();
            if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++;
            
        }
        
        System.out.println("AC x "+ac);
        System.out.println("WA x "+wa);
        System.out.println("TLE x "+tle);
        System.out.println("RE x "+re);
    	
    	
    }
    
	public static void main (String[] args)
	 {
	 int t=1;
	 while(t-->0)
	 {
	  solve();
	 }
}
} Main static Scanner in = new Scanner(System.in); in new Scanner(System.in) public static void solve()
    {   
        int n=in.nextInt();
        int ac=0,wa=0,tle=0,re=0;
        in.nextLine();
        for(int i=0;i<n;i++)
        {
            String s=in.nextLine();
            if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++;
            
        }
        
        System.out.println("AC x "+ac);
        System.out.println("WA x "+wa);
        System.out.println("TLE x "+tle);
        System.out.println("RE x "+re);
    	
    	
    } solve {   
        int n=in.nextInt();
        int ac=0,wa=0,tle=0,re=0;
        in.nextLine();
        for(int i=0;i<n;i++)
        {
            String s=in.nextLine();
            if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++;
            
        }
        
        System.out.println("AC x "+ac);
        System.out.println("WA x "+wa);
        System.out.println("TLE x "+tle);
        System.out.println("RE x "+re);
    	
    	
    } int n=in.nextInt(); n in.nextInt() in.nextInt in int ac=0 ac 0 wa=0 wa 0 tle=0 tle 0 re=0; re 0 in.nextLine() in.nextLine in for(int i=0;i<n;i++)
        {
            String s=in.nextLine();
            if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++;
            
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            String s=in.nextLine();
            if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++;
            
        } {
            String s=in.nextLine();
            if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++;
            
        } String s=in.nextLine(); s in.nextLine() in.nextLine in if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++; s.equals("AC") s.equals s "AC" ac++ ac if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++; s.equals("WA") s.equals s "WA" wa++ wa if(s.equals("TLE"))tle++;
            else re++; s.equals("TLE") s.equals s "TLE" tle++ tle re++ re System.out.println("AC x "+ac) System.out.println System.out System System.out "AC x "+ac "AC x " ac System.out.println("WA x "+wa) System.out.println System.out System System.out "WA x "+wa "WA x " wa System.out.println("TLE x "+tle) System.out.println System.out System System.out "TLE x "+tle "TLE x " tle System.out.println("RE x "+re) System.out.println System.out System System.out "RE x "+re "RE x " re public static void main (String[] args)
	 {
	 int t=1;
	 while(t-->0)
	 {
	  solve();
	 }
} main {
	 int t=1;
	 while(t-->0)
	 {
	  solve();
	 }
} int t=1; t 1 while(t-->0)
	 {
	  solve();
	 } t-->0 t-- t 0 {
	  solve();
	 } solve() solve String[] args args public class Main
 {
 static Scanner in = new Scanner(System.in);
 
 
 
 
    public static void solve()
    {   
        int n=in.nextInt();
        int ac=0,wa=0,tle=0,re=0;
        in.nextLine();
        for(int i=0;i<n;i++)
        {
            String s=in.nextLine();
            if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++;
            
        }
        
        System.out.println("AC x "+ac);
        System.out.println("WA x "+wa);
        System.out.println("TLE x "+tle);
        System.out.println("RE x "+re);
    	
    	
    }
    
	public static void main (String[] args)
	 {
	 int t=1;
	 while(t-->0)
	 {
	  solve();
	 }
}
} public class Main
 {
 static Scanner in = new Scanner(System.in);
 
 
 
 
    public static void solve()
    {   
        int n=in.nextInt();
        int ac=0,wa=0,tle=0,re=0;
        in.nextLine();
        for(int i=0;i<n;i++)
        {
            String s=in.nextLine();
            if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++;
            
        }
        
        System.out.println("AC x "+ac);
        System.out.println("WA x "+wa);
        System.out.println("TLE x "+tle);
        System.out.println("RE x "+re);
    	
    	
    }
    
	public static void main (String[] args)
	 {
	 int t=1;
	 while(t-->0)
	 {
	  solve();
	 }
}
} Main
/*input
5 5 2 3



*/
import java.util.*;
import java.lang.*;
import java.io.*;
public class Main
 {
 static Scanner in = new Scanner(System.in);
 
 
 
 
    public static void solve()
    {   
        int n=in.nextInt();
        int ac=0,wa=0,tle=0,re=0;
        in.nextLine();
        for(int i=0;i<n;i++)
        {
            String s=in.nextLine();
            if(s.equals("AC"))ac++;
            else if(s.equals("WA"))wa++;
            else if(s.equals("TLE"))tle++;
            else re++;
            
        }
        
        System.out.println("AC x "+ac);
        System.out.println("WA x "+wa);
        System.out.println("TLE x "+tle);
        System.out.println("RE x "+re);
    	
    	
    }
    
	public static void main (String[] args)
	 {
	 int t=1;
	 while(t-->0)
	 {
	  solve();
	 }
}
}