import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] words = new String[N];
        for(int i=0; i<N; i++){
            words[i] = scan.next();
        }
        scan.close();

        int ac_cnt=0;
        int wa_cnt=0;
        int tle_cnt=0;
        int re_cnt=0;

        for(int i=0; i<N; i++){
            switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            }
        }
        System.out.println("AC x " + ac_cnt);
        System.out.println("WA x " + wa_cnt);
        System.out.println("TLE x " + tle_cnt);
        System.out.println("RE x " + re_cnt);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] words = new String[N];
        for(int i=0; i<N; i++){
            words[i] = scan.next();
        }
        scan.close();

        int ac_cnt=0;
        int wa_cnt=0;
        int tle_cnt=0;
        int re_cnt=0;

        for(int i=0; i<N; i++){
            switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            }
        }
        System.out.println("AC x " + ac_cnt);
        System.out.println("WA x " + wa_cnt);
        System.out.println("TLE x " + tle_cnt);
        System.out.println("RE x " + re_cnt);
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] words = new String[N];
        for(int i=0; i<N; i++){
            words[i] = scan.next();
        }
        scan.close();

        int ac_cnt=0;
        int wa_cnt=0;
        int tle_cnt=0;
        int re_cnt=0;

        for(int i=0; i<N; i++){
            switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            }
        }
        System.out.println("AC x " + ac_cnt);
        System.out.println("WA x " + wa_cnt);
        System.out.println("TLE x " + tle_cnt);
        System.out.println("RE x " + re_cnt);
    } main {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] words = new String[N];
        for(int i=0; i<N; i++){
            words[i] = scan.next();
        }
        scan.close();

        int ac_cnt=0;
        int wa_cnt=0;
        int tle_cnt=0;
        int re_cnt=0;

        for(int i=0; i<N; i++){
            switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            }
        }
        System.out.println("AC x " + ac_cnt);
        System.out.println("WA x " + wa_cnt);
        System.out.println("TLE x " + tle_cnt);
        System.out.println("RE x " + re_cnt);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan String[] words = new String[N]; words new String[N] N for(int i=0; i<N; i++){
            words[i] = scan.next();
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            words[i] = scan.next();
        } {
            words[i] = scan.next();
        } words[i] = scan.next() words[i] words i scan.next() scan.next scan scan.close() scan.close scan int ac_cnt=0; ac_cnt 0 int wa_cnt=0; wa_cnt 0 int tle_cnt=0; tle_cnt 0 int re_cnt=0; re_cnt 0 for(int i=0; i<N; i++){
            switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            }
        } {
            switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            }
        } switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            } words[i] words i case "AC": "AC" case "AC": ac_cnt++ ac_cnt break; case "WA": "WA" case "WA": wa_cnt++ wa_cnt break; case "TLE": "TLE" case "TLE": tle_cnt++ tle_cnt break; case "RE": "RE" case "RE": re_cnt++ re_cnt break; System.out.println("AC x " + ac_cnt) System.out.println System.out System System.out "AC x " + ac_cnt "AC x " ac_cnt System.out.println("WA x " + wa_cnt) System.out.println System.out System System.out "WA x " + wa_cnt "WA x " wa_cnt System.out.println("TLE x " + tle_cnt) System.out.println System.out System System.out "TLE x " + tle_cnt "TLE x " tle_cnt System.out.println("RE x " + re_cnt) System.out.println System.out System System.out "RE x " + re_cnt "RE x " re_cnt String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] words = new String[N];
        for(int i=0; i<N; i++){
            words[i] = scan.next();
        }
        scan.close();

        int ac_cnt=0;
        int wa_cnt=0;
        int tle_cnt=0;
        int re_cnt=0;

        for(int i=0; i<N; i++){
            switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            }
        }
        System.out.println("AC x " + ac_cnt);
        System.out.println("WA x " + wa_cnt);
        System.out.println("TLE x " + tle_cnt);
        System.out.println("RE x " + re_cnt);
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] words = new String[N];
        for(int i=0; i<N; i++){
            words[i] = scan.next();
        }
        scan.close();

        int ac_cnt=0;
        int wa_cnt=0;
        int tle_cnt=0;
        int re_cnt=0;

        for(int i=0; i<N; i++){
            switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            }
        }
        System.out.println("AC x " + ac_cnt);
        System.out.println("WA x " + wa_cnt);
        System.out.println("TLE x " + tle_cnt);
        System.out.println("RE x " + re_cnt);
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        String[] words = new String[N];
        for(int i=0; i<N; i++){
            words[i] = scan.next();
        }
        scan.close();

        int ac_cnt=0;
        int wa_cnt=0;
        int tle_cnt=0;
        int re_cnt=0;

        for(int i=0; i<N; i++){
            switch(words[i]){
                case "AC":
                    ac_cnt++;
                    break;
                case "WA":
                    wa_cnt++;
                    break;
                case "TLE":
                    tle_cnt++;
                    break;
                case "RE":
                    re_cnt++;
                    break;
            }
        }
        System.out.println("AC x " + ac_cnt);
        System.out.println("WA x " + wa_cnt);
        System.out.println("TLE x " + tle_cnt);
        System.out.println("RE x " + re_cnt);
    }
}