import java.util.Scanner;

public class Main {
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = Integer.parseInt(sc.nextLine());
        
        String  str[] = new String[n];
        
        
        for(int i = 0; i < n ; i++){
             str[i] = sc.next();
        }

        //for(int i = 0; i < n ; i++){
        //    System.out.println(str[i]);
       //}
        
        int cnt_AC = 0;
        int cnt_WA = 0;
        int cnt_TLE = 0;
        int cnt_RE = 0;

        
        for(int i = 0; i < n ; i++){
            if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            }
       }
        System.out.println("AC x "+cnt_AC);  
        //System.out.println(cnt_AC);  
        System.out.println("WA x "+cnt_WA);  
        System.out.println("TLE x "+cnt_TLE);  
        System.out.println("RE x "+cnt_RE);  
}

} import java.util.Scanner; Scanner java.util public class Main {
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = Integer.parseInt(sc.nextLine());
        
        String  str[] = new String[n];
        
        
        for(int i = 0; i < n ; i++){
             str[i] = sc.next();
        }

        //for(int i = 0; i < n ; i++){
        //    System.out.println(str[i]);
       //}
        
        int cnt_AC = 0;
        int cnt_WA = 0;
        int cnt_TLE = 0;
        int cnt_RE = 0;

        
        for(int i = 0; i < n ; i++){
            if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            }
       }
        System.out.println("AC x "+cnt_AC);  
        //System.out.println(cnt_AC);  
        System.out.println("WA x "+cnt_WA);  
        System.out.println("TLE x "+cnt_TLE);  
        System.out.println("RE x "+cnt_RE);  
}

} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = Integer.parseInt(sc.nextLine());
        
        String  str[] = new String[n];
        
        
        for(int i = 0; i < n ; i++){
             str[i] = sc.next();
        }

        //for(int i = 0; i < n ; i++){
        //    System.out.println(str[i]);
       //}
        
        int cnt_AC = 0;
        int cnt_WA = 0;
        int cnt_TLE = 0;
        int cnt_RE = 0;

        
        for(int i = 0; i < n ; i++){
            if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            }
       }
        System.out.println("AC x "+cnt_AC);  
        //System.out.println(cnt_AC);  
        System.out.println("WA x "+cnt_WA);  
        System.out.println("TLE x "+cnt_TLE);  
        System.out.println("RE x "+cnt_RE);  
} main {
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = Integer.parseInt(sc.nextLine());
        
        String  str[] = new String[n];
        
        
        for(int i = 0; i < n ; i++){
             str[i] = sc.next();
        }

        //for(int i = 0; i < n ; i++){
        //    System.out.println(str[i]);
       //}
        
        int cnt_AC = 0;
        int cnt_WA = 0;
        int cnt_TLE = 0;
        int cnt_RE = 0;

        
        for(int i = 0; i < n ; i++){
            if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            }
       }
        System.out.println("AC x "+cnt_AC);  
        //System.out.println(cnt_AC);  
        System.out.println("WA x "+cnt_WA);  
        System.out.println("TLE x "+cnt_TLE);  
        System.out.println("RE x "+cnt_RE);  
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.nextLine()); n Integer.parseInt(sc.nextLine()) Integer.parseInt Integer sc.nextLine() sc.nextLine sc String  str[] = new String[n]; str new String[n] n for(int i = 0; i < n ; i++){
             str[i] = sc.next();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
             str[i] = sc.next();
        } {
             str[i] = sc.next();
        } str[i] = sc.next() str[i] str i sc.next() sc.next sc int cnt_AC = 0; cnt_AC 0 int cnt_WA = 0; cnt_WA 0 int cnt_TLE = 0; cnt_TLE 0 int cnt_RE = 0; cnt_RE 0 for(int i = 0; i < n ; i++){
            if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            }
       } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            }
       } {
            if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            }
       } if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            } str[i] .equals( "AC") str[i] .equals str[i] str i "AC" {
                //System.out.println("AC ");
                 cnt_AC ++;
            } cnt_AC ++ cnt_AC if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            } str[i] .equals("WA") str[i] .equals str[i] str i "WA" {
                cnt_WA ++;
                
            } cnt_WA ++ cnt_WA if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            } str[i].equals( "TLE") str[i].equals str[i] str i "TLE" {
                cnt_TLE++;
            } cnt_TLE++ cnt_TLE if( str[i].equals("RE")){
                cnt_RE++;
            } str[i].equals("RE") str[i].equals str[i] str i "RE" {
                cnt_RE++;
            } cnt_RE++ cnt_RE System.out.println("AC x "+cnt_AC) System.out.println System.out System System.out "AC x "+cnt_AC "AC x " cnt_AC System.out.println("WA x "+cnt_WA) System.out.println System.out System System.out "WA x "+cnt_WA "WA x " cnt_WA System.out.println("TLE x "+cnt_TLE) System.out.println System.out System System.out "TLE x "+cnt_TLE "TLE x " cnt_TLE System.out.println("RE x "+cnt_RE) System.out.println System.out System System.out "RE x "+cnt_RE "RE x " cnt_RE String[] args args public class Main {
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = Integer.parseInt(sc.nextLine());
        
        String  str[] = new String[n];
        
        
        for(int i = 0; i < n ; i++){
             str[i] = sc.next();
        }

        //for(int i = 0; i < n ; i++){
        //    System.out.println(str[i]);
       //}
        
        int cnt_AC = 0;
        int cnt_WA = 0;
        int cnt_TLE = 0;
        int cnt_RE = 0;

        
        for(int i = 0; i < n ; i++){
            if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            }
       }
        System.out.println("AC x "+cnt_AC);  
        //System.out.println(cnt_AC);  
        System.out.println("WA x "+cnt_WA);  
        System.out.println("TLE x "+cnt_TLE);  
        System.out.println("RE x "+cnt_RE);  
}

} public class Main {
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = Integer.parseInt(sc.nextLine());
        
        String  str[] = new String[n];
        
        
        for(int i = 0; i < n ; i++){
             str[i] = sc.next();
        }

        //for(int i = 0; i < n ; i++){
        //    System.out.println(str[i]);
       //}
        
        int cnt_AC = 0;
        int cnt_WA = 0;
        int cnt_TLE = 0;
        int cnt_RE = 0;

        
        for(int i = 0; i < n ; i++){
            if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            }
       }
        System.out.println("AC x "+cnt_AC);  
        //System.out.println(cnt_AC);  
        System.out.println("WA x "+cnt_WA);  
        System.out.println("TLE x "+cnt_TLE);  
        System.out.println("RE x "+cnt_RE);  
}

} Main
import java.util.Scanner;

public class Main {
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        // 整数の入力
        int n = Integer.parseInt(sc.nextLine());
        
        String  str[] = new String[n];
        
        
        for(int i = 0; i < n ; i++){
             str[i] = sc.next();
        }

        //for(int i = 0; i < n ; i++){
        //    System.out.println(str[i]);
       //}
        
        int cnt_AC = 0;
        int cnt_WA = 0;
        int cnt_TLE = 0;
        int cnt_RE = 0;

        
        for(int i = 0; i < n ; i++){
            if( str[i] .equals( "AC")){
                //System.out.println("AC ");
                 cnt_AC ++;
            }else if( str[i] .equals("WA")){
                cnt_WA ++;
                
            }else if( str[i].equals( "TLE")){
                cnt_TLE++;
            }else if( str[i].equals("RE")){
                cnt_RE++;
            }
       }
        System.out.println("AC x "+cnt_AC);  
        //System.out.println(cnt_AC);  
        System.out.println("WA x "+cnt_WA);  
        System.out.println("TLE x "+cnt_TLE);  
        System.out.println("RE x "+cnt_RE);  
}

}