// 173 b
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        int n = input.nextInt();
        for (int i = 0; i < n; i++){
            String s = input.next();
            if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            }
        }
        System.out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n",ac,wa,tle,re);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        int n = input.nextInt();
        for (int i = 0; i < n; i++){
            String s = input.next();
            if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            }
        }
        System.out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n",ac,wa,tle,re);
    }
} Main public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        int n = input.nextInt();
        for (int i = 0; i < n; i++){
            String s = input.next();
            if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            }
        }
        System.out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n",ac,wa,tle,re);
    } main {
        Scanner input = new Scanner(System.in);
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        int n = input.nextInt();
        for (int i = 0; i < n; i++){
            String s = input.next();
            if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            }
        }
        System.out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n",ac,wa,tle,re);
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int ac = 0; ac 0 int wa = 0; wa 0 int tle = 0; tle 0 int re = 0; re 0 int n = input.nextInt(); n input.nextInt() input.nextInt input for (int i = 0; i < n; i++){
            String s = input.next();
            if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String s = input.next();
            if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            }
        } {
            String s = input.next();
            if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            }
        } String s = input.next(); s input.next() input.next input if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            } s.equals("AC") s.equals s "AC" {
                ac += 1;
            } ac += 1 ac 1 if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            } s.equals("WA") s.equals s "WA" {
                wa += 1;
            } wa += 1 wa 1 if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            } s.equals("TLE") s.equals s "TLE" {
                tle += 1;
            } tle += 1 tle 1 {
                re += 1;
            } re += 1 re 1 System.out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n",ac,wa,tle,re) System.out.printf System.out System System.out "AC x %d\nWA x %d\nTLE x %d\nRE x %d\n" ac wa tle re String[] args args public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        int n = input.nextInt();
        for (int i = 0; i < n; i++){
            String s = input.next();
            if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            }
        }
        System.out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n",ac,wa,tle,re);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        int n = input.nextInt();
        for (int i = 0; i < n; i++){
            String s = input.next();
            if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            }
        }
        System.out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n",ac,wa,tle,re);
    }
} Main
// 173 b
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int ac = 0;
        int wa = 0;
        int tle = 0;
        int re = 0;
        int n = input.nextInt();
        for (int i = 0; i < n; i++){
            String s = input.next();
            if(s.equals("AC")){
                ac += 1;
            } else if (s.equals("WA")){
                wa += 1;
            } else if (s.equals("TLE")){
                tle += 1;
            } else {
                re += 1;
            }
        }
        System.out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n",ac,wa,tle,re);
    }
}