import java.util.Scanner;

public class Main {
   public static void main(String[] args) {
        int c0=0;
        int c1=0;
        int c2=0;
        int c3=0;

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }
         sc.close();
        for(int i = 0; i<n; i++){
            if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            }
        }
       
        System.out.println("AC x "+c0);
        System.out.println("WA x "+c1);
        System.out.println("TLE x "+c2);
        System.out.println("RE x "+c3);


    }
} import java.util.Scanner; Scanner java.util public class Main {
   public static void main(String[] args) {
        int c0=0;
        int c1=0;
        int c2=0;
        int c3=0;

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }
         sc.close();
        for(int i = 0; i<n; i++){
            if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            }
        }
       
        System.out.println("AC x "+c0);
        System.out.println("WA x "+c1);
        System.out.println("TLE x "+c2);
        System.out.println("RE x "+c3);


    }
} Main public static void main(String[] args) {
        int c0=0;
        int c1=0;
        int c2=0;
        int c3=0;

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }
         sc.close();
        for(int i = 0; i<n; i++){
            if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            }
        }
       
        System.out.println("AC x "+c0);
        System.out.println("WA x "+c1);
        System.out.println("TLE x "+c2);
        System.out.println("RE x "+c3);


    } main {
        int c0=0;
        int c1=0;
        int c2=0;
        int c3=0;

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }
         sc.close();
        for(int i = 0; i<n; i++){
            if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            }
        }
       
        System.out.println("AC x "+c0);
        System.out.println("WA x "+c1);
        System.out.println("TLE x "+c2);
        System.out.println("RE x "+c3);


    } int c0=0; c0 0 int c1=0; c1 0 int c2=0; c2 0 int c3=0; c3 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt 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 sc.close() sc.close sc for(int i = 0; i<n; i++){
            if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            }
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            }
        } {
            if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            }
        } if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            } str[i].equals("AC") str[i].equals str[i] str i "AC" {
                c0++;
            } c0++ c0 if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            } str[i].equals("WA") str[i].equals str[i] str i "WA" {
                c1++;
            } c1++ c1 if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            } str[i].equals("TLE") str[i].equals str[i] str i "TLE" {
                c2++;
            } c2++ c2 if(str[i].equals("RE")){
                c3++;
            } str[i].equals("RE") str[i].equals str[i] str i "RE" {
                c3++;
            } c3++ c3 System.out.println("AC x "+c0) System.out.println System.out System System.out "AC x "+c0 "AC x " c0 System.out.println("WA x "+c1) System.out.println System.out System System.out "WA x "+c1 "WA x " c1 System.out.println("TLE x "+c2) System.out.println System.out System System.out "TLE x "+c2 "TLE x " c2 System.out.println("RE x "+c3) System.out.println System.out System System.out "RE x "+c3 "RE x " c3 String[] args args public class Main {
   public static void main(String[] args) {
        int c0=0;
        int c1=0;
        int c2=0;
        int c3=0;

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }
         sc.close();
        for(int i = 0; i<n; i++){
            if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            }
        }
       
        System.out.println("AC x "+c0);
        System.out.println("WA x "+c1);
        System.out.println("TLE x "+c2);
        System.out.println("RE x "+c3);


    }
} public class Main {
   public static void main(String[] args) {
        int c0=0;
        int c1=0;
        int c2=0;
        int c3=0;

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }
         sc.close();
        for(int i = 0; i<n; i++){
            if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            }
        }
       
        System.out.println("AC x "+c0);
        System.out.println("WA x "+c1);
        System.out.println("TLE x "+c2);
        System.out.println("RE x "+c3);


    }
} Main
import java.util.Scanner;

public class Main {
   public static void main(String[] args) {
        int c0=0;
        int c1=0;
        int c2=0;
        int c3=0;

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String[] str = new String[n];
        for(int i = 0; i<n; i++){
            str[i] = sc.next();
        }
         sc.close();
        for(int i = 0; i<n; i++){
            if(str[i].equals("AC")) {
                c0++;
            }else if(str[i].equals("WA") ){
                c1++;
            }else if(str[i].equals("TLE") ){
                c2++;
            }else if(str[i].equals("RE")){
                c3++;
            }
        }
       
        System.out.println("AC x "+c0);
        System.out.println("WA x "+c1);
        System.out.println("TLE x "+c2);
        System.out.println("RE x "+c3);


    }
}