import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count_ac=0;
        int count_wa=0;
        int count_tle=0;
        int count_re=0;
        
        
        for(int i=0;i<n;i++){
            String str = sc.next();
            if(str.equals("AC")){
                count_ac++;
                continue;
            }
            if(str.equals("WA")){
                count_wa++;
                continue;
            }
            if(str.equals("TLE")){
                count_tle++;
                continue;
            }
            if(str.equals("RE")){
                count_re++;
                continue;
            }
            
        }
        System.out.println("AC x " + count_ac);
        System.out.println("WA x " + count_wa);
        System.out.println("TLE x " + count_tle);
        System.out.println("RE x " + count_re);

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count_ac=0;
        int count_wa=0;
        int count_tle=0;
        int count_re=0;
        
        
        for(int i=0;i<n;i++){
            String str = sc.next();
            if(str.equals("AC")){
                count_ac++;
                continue;
            }
            if(str.equals("WA")){
                count_wa++;
                continue;
            }
            if(str.equals("TLE")){
                count_tle++;
                continue;
            }
            if(str.equals("RE")){
                count_re++;
                continue;
            }
            
        }
        System.out.println("AC x " + count_ac);
        System.out.println("WA x " + count_wa);
        System.out.println("TLE x " + count_tle);
        System.out.println("RE x " + count_re);

    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count_ac=0;
        int count_wa=0;
        int count_tle=0;
        int count_re=0;
        
        
        for(int i=0;i<n;i++){
            String str = sc.next();
            if(str.equals("AC")){
                count_ac++;
                continue;
            }
            if(str.equals("WA")){
                count_wa++;
                continue;
            }
            if(str.equals("TLE")){
                count_tle++;
                continue;
            }
            if(str.equals("RE")){
                count_re++;
                continue;
            }
            
        }
        System.out.println("AC x " + count_ac);
        System.out.println("WA x " + count_wa);
        System.out.println("TLE x " + count_tle);
        System.out.println("RE x " + count_re);

    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count_ac=0;
        int count_wa=0;
        int count_tle=0;
        int count_re=0;
        
        
        for(int i=0;i<n;i++){
            String str = sc.next();
            if(str.equals("AC")){
                count_ac++;
                continue;
            }
            if(str.equals("WA")){
                count_wa++;
                continue;
            }
            if(str.equals("TLE")){
                count_tle++;
                continue;
            }
            if(str.equals("RE")){
                count_re++;
                continue;
            }
            
        }
        System.out.println("AC x " + count_ac);
        System.out.println("WA x " + count_wa);
        System.out.println("TLE x " + count_tle);
        System.out.println("RE x " + count_re);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int count_ac=0; count_ac 0 int count_wa=0; count_wa 0 int count_tle=0; count_tle 0 int count_re=0; count_re 0 for(int i=0;i<n;i++){
            String str = sc.next();
            if(str.equals("AC")){
                count_ac++;
                continue;
            }
            if(str.equals("WA")){
                count_wa++;
                continue;
            }
            if(str.equals("TLE")){
                count_tle++;
                continue;
            }
            if(str.equals("RE")){
                count_re++;
                continue;
            }
            
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            String str = sc.next();
            if(str.equals("AC")){
                count_ac++;
                continue;
            }
            if(str.equals("WA")){
                count_wa++;
                continue;
            }
            if(str.equals("TLE")){
                count_tle++;
                continue;
            }
            if(str.equals("RE")){
                count_re++;
                continue;
            }
            
        } {
            String str = sc.next();
            if(str.equals("AC")){
                count_ac++;
                continue;
            }
            if(str.equals("WA")){
                count_wa++;
                continue;
            }
            if(str.equals("TLE")){
                count_tle++;
                continue;
            }
            if(str.equals("RE")){
                count_re++;
                continue;
            }
            
        } String str = sc.next(); str sc.next() sc.next sc if(str.equals("AC")){
                count_ac++;
                continue;
            } str.equals("AC") str.equals str "AC" {
                count_ac++;
                continue;
            } count_ac++ count_ac continue; if(str.equals("WA")){
                count_wa++;
                continue;
            } str.equals("WA") str.equals str "WA" {
                count_wa++;
                continue;
            } count_wa++ count_wa continue; if(str.equals("TLE")){
                count_tle++;
                continue;
            } str.equals("TLE") str.equals str "TLE" {
                count_tle++;
                continue;
            } count_tle++ count_tle continue; if(str.equals("RE")){
                count_re++;
                continue;
            } str.equals("RE") str.equals str "RE" {
                count_re++;
                continue;
            } count_re++ count_re continue; System.out.println("AC x " + count_ac) System.out.println System.out System System.out "AC x " + count_ac "AC x " count_ac System.out.println("WA x " + count_wa) System.out.println System.out System System.out "WA x " + count_wa "WA x " count_wa System.out.println("TLE x " + count_tle) System.out.println System.out System System.out "TLE x " + count_tle "TLE x " count_tle System.out.println("RE x " + count_re) System.out.println System.out System System.out "RE x " + count_re "RE x " count_re String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count_ac=0;
        int count_wa=0;
        int count_tle=0;
        int count_re=0;
        
        
        for(int i=0;i<n;i++){
            String str = sc.next();
            if(str.equals("AC")){
                count_ac++;
                continue;
            }
            if(str.equals("WA")){
                count_wa++;
                continue;
            }
            if(str.equals("TLE")){
                count_tle++;
                continue;
            }
            if(str.equals("RE")){
                count_re++;
                continue;
            }
            
        }
        System.out.println("AC x " + count_ac);
        System.out.println("WA x " + count_wa);
        System.out.println("TLE x " + count_tle);
        System.out.println("RE x " + count_re);

    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count_ac=0;
        int count_wa=0;
        int count_tle=0;
        int count_re=0;
        
        
        for(int i=0;i<n;i++){
            String str = sc.next();
            if(str.equals("AC")){
                count_ac++;
                continue;
            }
            if(str.equals("WA")){
                count_wa++;
                continue;
            }
            if(str.equals("TLE")){
                count_tle++;
                continue;
            }
            if(str.equals("RE")){
                count_re++;
                continue;
            }
            
        }
        System.out.println("AC x " + count_ac);
        System.out.println("WA x " + count_wa);
        System.out.println("TLE x " + count_tle);
        System.out.println("RE x " + count_re);

    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count_ac=0;
        int count_wa=0;
        int count_tle=0;
        int count_re=0;
        
        
        for(int i=0;i<n;i++){
            String str = sc.next();
            if(str.equals("AC")){
                count_ac++;
                continue;
            }
            if(str.equals("WA")){
                count_wa++;
                continue;
            }
            if(str.equals("TLE")){
                count_tle++;
                continue;
            }
            if(str.equals("RE")){
                count_re++;
                continue;
            }
            
        }
        System.out.println("AC x " + count_ac);
        System.out.println("WA x " + count_wa);
        System.out.println("TLE x " + count_tle);
        System.out.println("RE x " + count_re);

    }
}
