import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),x = 0;
        Map<String,Integer> map = new LinkedHashMap<>();
        String[] items = {"AC","WA","TLE","RE"};
        for (String s: items) map.put(s,0);
        for (int i = 0; i < a; i++) {
            String ans = sc.next();
            map.put(ans,map.get(ans)+1);
        }
        for(int n:map.values()) System.out.println(items[x++] + " x " + n);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),x = 0;
        Map<String,Integer> map = new LinkedHashMap<>();
        String[] items = {"AC","WA","TLE","RE"};
        for (String s: items) map.put(s,0);
        for (int i = 0; i < a; i++) {
            String ans = sc.next();
            map.put(ans,map.get(ans)+1);
        }
        for(int n:map.values()) System.out.println(items[x++] + " x " + n);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),x = 0;
        Map<String,Integer> map = new LinkedHashMap<>();
        String[] items = {"AC","WA","TLE","RE"};
        for (String s: items) map.put(s,0);
        for (int i = 0; i < a; i++) {
            String ans = sc.next();
            map.put(ans,map.get(ans)+1);
        }
        for(int n:map.values()) System.out.println(items[x++] + " x " + n);
    } main {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),x = 0;
        Map<String,Integer> map = new LinkedHashMap<>();
        String[] items = {"AC","WA","TLE","RE"};
        for (String s: items) map.put(s,0);
        for (int i = 0; i < a; i++) {
            String ans = sc.next();
            map.put(ans,map.get(ans)+1);
        }
        for(int n:map.values()) System.out.println(items[x++] + " x " + n);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt() a sc.nextInt() sc.nextInt sc x = 0; x 0 Map<String,Integer> map = new LinkedHashMap<>(); map new LinkedHashMap<>() String[] items = {"AC","WA","TLE","RE"}; items {"AC","WA","TLE","RE"} "AC" "WA" "TLE" "RE" for (String s: items) map.put(s,0); String s items map.put(s,0); map.put(s,0) map.put map s 0 for (int i = 0; i < a; i++) {
            String ans = sc.next();
            map.put(ans,map.get(ans)+1);
        } int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
            String ans = sc.next();
            map.put(ans,map.get(ans)+1);
        } {
            String ans = sc.next();
            map.put(ans,map.get(ans)+1);
        } String ans = sc.next(); ans sc.next() sc.next sc map.put(ans,map.get(ans)+1) map.put map ans map.get(ans)+1 map.get(ans) map.get map ans 1 for(int n:map.values()) System.out.println(items[x++] + " x " + n); int n map.values() map.values map System.out.println(items[x++] + " x " + n); System.out.println(items[x++] + " x " + n) System.out.println System.out System System.out items[x++] + " x " + n items[x++] + " x " + n items[x++] items x++ x " x " n String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),x = 0;
        Map<String,Integer> map = new LinkedHashMap<>();
        String[] items = {"AC","WA","TLE","RE"};
        for (String s: items) map.put(s,0);
        for (int i = 0; i < a; i++) {
            String ans = sc.next();
            map.put(ans,map.get(ans)+1);
        }
        for(int n:map.values()) System.out.println(items[x++] + " x " + n);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),x = 0;
        Map<String,Integer> map = new LinkedHashMap<>();
        String[] items = {"AC","WA","TLE","RE"};
        for (String s: items) map.put(s,0);
        for (int i = 0; i < a; i++) {
            String ans = sc.next();
            map.put(ans,map.get(ans)+1);
        }
        for(int n:map.values()) System.out.println(items[x++] + " x " + n);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(),x = 0;
        Map<String,Integer> map = new LinkedHashMap<>();
        String[] items = {"AC","WA","TLE","RE"};
        for (String s: items) map.put(s,0);
        for (int i = 0; i < a; i++) {
            String ans = sc.next();
            map.put(ans,map.get(ans)+1);
        }
        for(int n:map.values()) System.out.println(items[x++] + " x " + n);
    }
}
