import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    int n = sc.nextInt();
    List<String> list = new ArrayList<>();
    int count1 = 0;
    int count2 = 0;
    int count3 = 0;
    int count4 = 0;

    for(int i = 0; i < n ; i++){
        list.add(sc.next());
    }

    for(int i = 0; i < n ; i++){
        if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        }
    }

    System.out.println("AC x "+ count1);
    System.out.println("WA x "+ count2);
    System.out.println("TLE x "+ count3);
    System.out.println("RE x "+ count4);

    

    




    





    
    


    
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.*; io.* java import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Collections; Collections java.util import java.util.Arrays; Arrays java.util public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    int n = sc.nextInt();
    List<String> list = new ArrayList<>();
    int count1 = 0;
    int count2 = 0;
    int count3 = 0;
    int count4 = 0;

    for(int i = 0; i < n ; i++){
        list.add(sc.next());
    }

    for(int i = 0; i < n ; i++){
        if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        }
    }

    System.out.println("AC x "+ count1);
    System.out.println("WA x "+ count2);
    System.out.println("TLE x "+ count3);
    System.out.println("RE x "+ count4);

    

    




    





    
    


    
	}
} Main public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    int n = sc.nextInt();
    List<String> list = new ArrayList<>();
    int count1 = 0;
    int count2 = 0;
    int count3 = 0;
    int count4 = 0;

    for(int i = 0; i < n ; i++){
        list.add(sc.next());
    }

    for(int i = 0; i < n ; i++){
        if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        }
    }

    System.out.println("AC x "+ count1);
    System.out.println("WA x "+ count2);
    System.out.println("TLE x "+ count3);
    System.out.println("RE x "+ count4);

    

    




    





    
    


    
	} main {
    
    Scanner sc = new Scanner(System.in);
    
    int n = sc.nextInt();
    List<String> list = new ArrayList<>();
    int count1 = 0;
    int count2 = 0;
    int count3 = 0;
    int count4 = 0;

    for(int i = 0; i < n ; i++){
        list.add(sc.next());
    }

    for(int i = 0; i < n ; i++){
        if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        }
    }

    System.out.println("AC x "+ count1);
    System.out.println("WA x "+ count2);
    System.out.println("TLE x "+ count3);
    System.out.println("RE x "+ count4);

    

    




    





    
    


    
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<String> list = new ArrayList<>(); list new ArrayList<>() int count1 = 0; count1 0 int count2 = 0; count2 0 int count3 = 0; count3 0 int count4 = 0; count4 0 for(int i = 0; i < n ; i++){
        list.add(sc.next());
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        list.add(sc.next());
    } {
        list.add(sc.next());
    } list.add(sc.next()) list.add list sc.next() sc.next sc for(int i = 0; i < n ; i++){
        if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
        if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        }
    } {
        if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        }
    } if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        } list.get(i).equals("AC") list.get(i).equals list.get(i) list.get list i "AC" {
            count1++;
        } count1++ count1 if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        } list.get(i).equals("WA") list.get(i).equals list.get(i) list.get list i "WA" {
            count2++;
        } count2++ count2 if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        } list.get(i).equals("TLE") list.get(i).equals list.get(i) list.get list i "TLE" {
            count3++;
        } count3++ count3 {
            count4++;
        } count4++ count4 System.out.println("AC x "+ count1) System.out.println System.out System System.out "AC x "+ count1 "AC x " count1 System.out.println("WA x "+ count2) System.out.println System.out System System.out "WA x "+ count2 "WA x " count2 System.out.println("TLE x "+ count3) System.out.println System.out System System.out "TLE x "+ count3 "TLE x " count3 System.out.println("RE x "+ count4) System.out.println System.out System System.out "RE x "+ count4 "RE x " count4 final String[] args args public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    int n = sc.nextInt();
    List<String> list = new ArrayList<>();
    int count1 = 0;
    int count2 = 0;
    int count3 = 0;
    int count4 = 0;

    for(int i = 0; i < n ; i++){
        list.add(sc.next());
    }

    for(int i = 0; i < n ; i++){
        if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        }
    }

    System.out.println("AC x "+ count1);
    System.out.println("WA x "+ count2);
    System.out.println("TLE x "+ count3);
    System.out.println("RE x "+ count4);

    

    




    





    
    


    
	}
} public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    int n = sc.nextInt();
    List<String> list = new ArrayList<>();
    int count1 = 0;
    int count2 = 0;
    int count3 = 0;
    int count4 = 0;

    for(int i = 0; i < n ; i++){
        list.add(sc.next());
    }

    for(int i = 0; i < n ; i++){
        if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        }
    }

    System.out.println("AC x "+ count1);
    System.out.println("WA x "+ count2);
    System.out.println("TLE x "+ count3);
    System.out.println("RE x "+ count4);

    

    




    





    
    


    
	}
} Main
import java.io.BufferedReader;
import java.io.*;
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
import java.util.Arrays;

public class Main {
	public static void main(final String[] args){
    
    Scanner sc = new Scanner(System.in);
    
    int n = sc.nextInt();
    List<String> list = new ArrayList<>();
    int count1 = 0;
    int count2 = 0;
    int count3 = 0;
    int count4 = 0;

    for(int i = 0; i < n ; i++){
        list.add(sc.next());
    }

    for(int i = 0; i < n ; i++){
        if(list.get(i).equals("AC")){
            count1++;
        }else if(list.get(i).equals("WA")){
            count2++;
        }else if(list.get(i).equals("TLE")){
            count3++;
        }else{
            count4++;
        }
    }

    System.out.println("AC x "+ count1);
    System.out.println("WA x "+ count2);
    System.out.println("TLE x "+ count3);
    System.out.println("RE x "+ count4);

    

    




    





    
    


    
	}
}