import java.lang.reflect.Array;
import java.util.*;
import java.io.* ;
/*
NOTES:
-more than 10 digits (10^10), use long
-prefix sum of 1's and -1's to control flow of highlighting a region
-log(a)/log(b) = log base b of a
-create a position array if trying to see if elements show up next to each other sequentially
 i.e. elements 1,2,3 are within 3 spots of each other in an array
      arr[scannedInt - 1] = i; (position of i at p[i] in original)
- use a freq array when counting instances of an element occurring
- increment the counter first before simulating anything turn-based (two player game)

 */

public class Main {
    static long mod = (long)(Math.pow(10, 9) + 7);
    public static String alpha = "zabcdefghijklmnopqrstuvwxy";
    public static void main(String[] args) throws IOException{
        Scanner scan = new Scanner(System.in);
        long t = 1;
        //System.out.println(t);
        while (t-- > 0){
            int n = scan.nextInt();
            HashMap<String, Integer> map = new HashMap<>();
            map.put("AC", 0);
            map.put("TLE", 0);
            map.put("WA", 0);
            map.put("RE", 0);
            for(int i = 0; i<n; i++){
                String str= scan.next();
                map.put(str, map.get(str)+1);
            }
            System.out.println("AC x "+map.get("AC"));
            System.out.println("WA x "+map.get("WA"));
            System.out.println("TLE x "+map.get("TLE"));
            System.out.println("RE x "+map.get("RE"));
        }
        scan.close();

    }


    static boolean isPalindrome(String s){
        for(int i = 0; i<s.length()/2; i++){
            if(s.charAt(i) != s.charAt(s.length()-i-1)) return false;
        }
        return true;
    }

    static ArrayList factors(long n ){
        ArrayList<Long> facts = new ArrayList<>();
        for(int i = 1; i<=(int)Math.sqrt(n); i++){
            if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            }
        }
        Collections.sort(facts);
        return facts;
    }

    static boolean isPrime (int n){
        if(factors(n).size() ==2) return true;
        else return false;
    }





    static long GCD(long a, long b) {
        // Everything divides 0
        if (a == 0) return b;
        if (b == 0) return a;

        // base case
        if (a == b) return a;

        // a is greater
        if (a > b) return GCD(a-b, b);
        return GCD(a, b-a);
    }
    static long LCM(long a, long b){
        return (a*b)/(GCD(a,b));
    }
    static String rev(String s){
        char[] arr = s.toCharArray();
        for(int i = 0; i<(s.length()+1)/2; i++){
            char temp = arr[i];
            arr[i] = arr[s.length()-i-1];
            arr[s.length()-i-1] = temp;
        }
        String fin = new String(arr);
        return fin;
    }
    static long pow(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a;
        else {
            long R = pow(a,N/2);
            if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            }
        }
    }

    static long powMod(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a % mod;
        else {
            long R = powMod(a,N/2) % mod;
            R *= R;
            R %= mod;
            if (N % 2 == 1) {
                R *= a;
                R %= mod;
            }
            return R % mod;
        }
    }

} import java.lang.reflect.Array; Array java.lang.reflect import java.util.*; util.* java import java.io.* ; io.* java public class Main {
    static long mod = (long)(Math.pow(10, 9) + 7);
    public static String alpha = "zabcdefghijklmnopqrstuvwxy";
    public static void main(String[] args) throws IOException{
        Scanner scan = new Scanner(System.in);
        long t = 1;
        //System.out.println(t);
        while (t-- > 0){
            int n = scan.nextInt();
            HashMap<String, Integer> map = new HashMap<>();
            map.put("AC", 0);
            map.put("TLE", 0);
            map.put("WA", 0);
            map.put("RE", 0);
            for(int i = 0; i<n; i++){
                String str= scan.next();
                map.put(str, map.get(str)+1);
            }
            System.out.println("AC x "+map.get("AC"));
            System.out.println("WA x "+map.get("WA"));
            System.out.println("TLE x "+map.get("TLE"));
            System.out.println("RE x "+map.get("RE"));
        }
        scan.close();

    }


    static boolean isPalindrome(String s){
        for(int i = 0; i<s.length()/2; i++){
            if(s.charAt(i) != s.charAt(s.length()-i-1)) return false;
        }
        return true;
    }

    static ArrayList factors(long n ){
        ArrayList<Long> facts = new ArrayList<>();
        for(int i = 1; i<=(int)Math.sqrt(n); i++){
            if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            }
        }
        Collections.sort(facts);
        return facts;
    }

    static boolean isPrime (int n){
        if(factors(n).size() ==2) return true;
        else return false;
    }





    static long GCD(long a, long b) {
        // Everything divides 0
        if (a == 0) return b;
        if (b == 0) return a;

        // base case
        if (a == b) return a;

        // a is greater
        if (a > b) return GCD(a-b, b);
        return GCD(a, b-a);
    }
    static long LCM(long a, long b){
        return (a*b)/(GCD(a,b));
    }
    static String rev(String s){
        char[] arr = s.toCharArray();
        for(int i = 0; i<(s.length()+1)/2; i++){
            char temp = arr[i];
            arr[i] = arr[s.length()-i-1];
            arr[s.length()-i-1] = temp;
        }
        String fin = new String(arr);
        return fin;
    }
    static long pow(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a;
        else {
            long R = pow(a,N/2);
            if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            }
        }
    }

    static long powMod(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a % mod;
        else {
            long R = powMod(a,N/2) % mod;
            R *= R;
            R %= mod;
            if (N % 2 == 1) {
                R *= a;
                R %= mod;
            }
            return R % mod;
        }
    }

} Main static long mod = (long)(Math.pow(10, 9) + 7); mod (long)(Math.pow(10, 9) + 7) Math.pow(10, 9) Math.pow Math 10 9 7 public static String alpha = "zabcdefghijklmnopqrstuvwxy"; alpha "zabcdefghijklmnopqrstuvwxy" public static void main(String[] args) throws IOException{
        Scanner scan = new Scanner(System.in);
        long t = 1;
        //System.out.println(t);
        while (t-- > 0){
            int n = scan.nextInt();
            HashMap<String, Integer> map = new HashMap<>();
            map.put("AC", 0);
            map.put("TLE", 0);
            map.put("WA", 0);
            map.put("RE", 0);
            for(int i = 0; i<n; i++){
                String str= scan.next();
                map.put(str, map.get(str)+1);
            }
            System.out.println("AC x "+map.get("AC"));
            System.out.println("WA x "+map.get("WA"));
            System.out.println("TLE x "+map.get("TLE"));
            System.out.println("RE x "+map.get("RE"));
        }
        scan.close();

    } main {
        Scanner scan = new Scanner(System.in);
        long t = 1;
        //System.out.println(t);
        while (t-- > 0){
            int n = scan.nextInt();
            HashMap<String, Integer> map = new HashMap<>();
            map.put("AC", 0);
            map.put("TLE", 0);
            map.put("WA", 0);
            map.put("RE", 0);
            for(int i = 0; i<n; i++){
                String str= scan.next();
                map.put(str, map.get(str)+1);
            }
            System.out.println("AC x "+map.get("AC"));
            System.out.println("WA x "+map.get("WA"));
            System.out.println("TLE x "+map.get("TLE"));
            System.out.println("RE x "+map.get("RE"));
        }
        scan.close();

    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long t = 1; t 1 while (t-- > 0){
            int n = scan.nextInt();
            HashMap<String, Integer> map = new HashMap<>();
            map.put("AC", 0);
            map.put("TLE", 0);
            map.put("WA", 0);
            map.put("RE", 0);
            for(int i = 0; i<n; i++){
                String str= scan.next();
                map.put(str, map.get(str)+1);
            }
            System.out.println("AC x "+map.get("AC"));
            System.out.println("WA x "+map.get("WA"));
            System.out.println("TLE x "+map.get("TLE"));
            System.out.println("RE x "+map.get("RE"));
        } t-- > 0 t-- t 0 {
            int n = scan.nextInt();
            HashMap<String, Integer> map = new HashMap<>();
            map.put("AC", 0);
            map.put("TLE", 0);
            map.put("WA", 0);
            map.put("RE", 0);
            for(int i = 0; i<n; i++){
                String str= scan.next();
                map.put(str, map.get(str)+1);
            }
            System.out.println("AC x "+map.get("AC"));
            System.out.println("WA x "+map.get("WA"));
            System.out.println("TLE x "+map.get("TLE"));
            System.out.println("RE x "+map.get("RE"));
        } int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan HashMap<String, Integer> map = new HashMap<>(); map new HashMap<>() map.put("AC", 0) map.put map "AC" 0 map.put("TLE", 0) map.put map "TLE" 0 map.put("WA", 0) map.put map "WA" 0 map.put("RE", 0) map.put map "RE" 0 for(int i = 0; i<n; i++){
                String str= scan.next();
                map.put(str, map.get(str)+1);
            } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
                String str= scan.next();
                map.put(str, map.get(str)+1);
            } {
                String str= scan.next();
                map.put(str, map.get(str)+1);
            } String str= scan.next(); str scan.next() scan.next scan map.put(str, map.get(str)+1) map.put map str map.get(str)+1 map.get(str) map.get map str 1 System.out.println("AC x "+map.get("AC")) System.out.println System.out System System.out "AC x "+map.get("AC") "AC x " map.get("AC") map.get map "AC" System.out.println("WA x "+map.get("WA")) System.out.println System.out System System.out "WA x "+map.get("WA") "WA x " map.get("WA") map.get map "WA" System.out.println("TLE x "+map.get("TLE")) System.out.println System.out System System.out "TLE x "+map.get("TLE") "TLE x " map.get("TLE") map.get map "TLE" System.out.println("RE x "+map.get("RE")) System.out.println System.out System System.out "RE x "+map.get("RE") "RE x " map.get("RE") map.get map "RE" scan.close() scan.close scan String[] args args static boolean isPalindrome(String s){
        for(int i = 0; i<s.length()/2; i++){
            if(s.charAt(i) != s.charAt(s.length()-i-1)) return false;
        }
        return true;
    } isPalindrome {
        for(int i = 0; i<s.length()/2; i++){
            if(s.charAt(i) != s.charAt(s.length()-i-1)) return false;
        }
        return true;
    } for(int i = 0; i<s.length()/2; i++){
            if(s.charAt(i) != s.charAt(s.length()-i-1)) return false;
        } int i = 0; int i = 0; i 0 i<s.length()/2 i s.length()/2 s.length() s.length s 2 i++ i++ i {
            if(s.charAt(i) != s.charAt(s.length()-i-1)) return false;
        } {
            if(s.charAt(i) != s.charAt(s.length()-i-1)) return false;
        } if(s.charAt(i) != s.charAt(s.length()-i-1)) return false; s.charAt(i) != s.charAt(s.length()-i-1) s.charAt(i) s.charAt s i s.charAt(s.length()-i-1) s.charAt s s.length()-i-1 s.length()-i-1 s.length() s.length s i 1 return false; false return true; true String s s static ArrayList factors(long n ){
        ArrayList<Long> facts = new ArrayList<>();
        for(int i = 1; i<=(int)Math.sqrt(n); i++){
            if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            }
        }
        Collections.sort(facts);
        return facts;
    } factors {
        ArrayList<Long> facts = new ArrayList<>();
        for(int i = 1; i<=(int)Math.sqrt(n); i++){
            if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            }
        }
        Collections.sort(facts);
        return facts;
    } ArrayList<Long> facts = new ArrayList<>(); facts new ArrayList<>() for(int i = 1; i<=(int)Math.sqrt(n); i++){
            if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            }
        } int i = 1; int i = 1; i 1 i<=(int)Math.sqrt(n) i (int)Math.sqrt(n) Math.sqrt Math n i++ i++ i {
            if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            }
        } {
            if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            }
        } if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            } n%i == 0 n%i n i 0 {
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            } if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                } i == Math.sqrt(n) i Math.sqrt(n) Math.sqrt Math n facts.add((long)i) facts.add facts (long)i {
                    facts.add((long)i);
                    facts.add(n/i);
                } facts.add((long)i) facts.add facts (long)i facts.add(n/i) facts.add facts n/i n i Collections.sort(facts) Collections.sort Collections facts return facts; facts long n n static boolean isPrime (int n){
        if(factors(n).size() ==2) return true;
        else return false;
    } isPrime {
        if(factors(n).size() ==2) return true;
        else return false;
    } if(factors(n).size() ==2) return true;
        else return false; factors(n).size() ==2 factors(n).size() factors(n).size factors(n) factors n 2 return true; true return false; false int n n static long GCD(long a, long b) {
        // Everything divides 0
        if (a == 0) return b;
        if (b == 0) return a;

        // base case
        if (a == b) return a;

        // a is greater
        if (a > b) return GCD(a-b, b);
        return GCD(a, b-a);
    } GCD {
        // Everything divides 0
        if (a == 0) return b;
        if (b == 0) return a;

        // base case
        if (a == b) return a;

        // a is greater
        if (a > b) return GCD(a-b, b);
        return GCD(a, b-a);
    } if (a == 0) return b; a == 0 a 0 return b; b if (b == 0) return a; b == 0 b 0 return a; a if (a == b) return a; a == b a b return a; a if (a > b) return GCD(a-b, b); a > b a b return GCD(a-b, b); GCD(a-b, b) GCD a-b a b b return GCD(a, b-a); GCD(a, b-a) GCD a b-a b a long a a long b b static long LCM(long a, long b){
        return (a*b)/(GCD(a,b));
    } LCM {
        return (a*b)/(GCD(a,b));
    } return (a*b)/(GCD(a,b)); (a*b)/(GCD(a,b)) (a*b) a b (GCD(a,b)) GCD a b long a a long b b static String rev(String s){
        char[] arr = s.toCharArray();
        for(int i = 0; i<(s.length()+1)/2; i++){
            char temp = arr[i];
            arr[i] = arr[s.length()-i-1];
            arr[s.length()-i-1] = temp;
        }
        String fin = new String(arr);
        return fin;
    } rev {
        char[] arr = s.toCharArray();
        for(int i = 0; i<(s.length()+1)/2; i++){
            char temp = arr[i];
            arr[i] = arr[s.length()-i-1];
            arr[s.length()-i-1] = temp;
        }
        String fin = new String(arr);
        return fin;
    } char[] arr = s.toCharArray(); arr s.toCharArray() s.toCharArray s for(int i = 0; i<(s.length()+1)/2; i++){
            char temp = arr[i];
            arr[i] = arr[s.length()-i-1];
            arr[s.length()-i-1] = temp;
        } int i = 0; int i = 0; i 0 i<(s.length()+1)/2 i (s.length()+1)/2 (s.length()+1) s.length() s.length s 1 2 i++ i++ i {
            char temp = arr[i];
            arr[i] = arr[s.length()-i-1];
            arr[s.length()-i-1] = temp;
        } {
            char temp = arr[i];
            arr[i] = arr[s.length()-i-1];
            arr[s.length()-i-1] = temp;
        } char temp = arr[i]; temp arr[i] arr i arr[i] = arr[s.length()-i-1] arr[i] arr i arr[s.length()-i-1] arr s.length()-i-1 s.length()-i-1 s.length() s.length s i 1 arr[s.length()-i-1] = temp arr[s.length()-i-1] arr s.length()-i-1 s.length()-i-1 s.length() s.length s i 1 temp String fin = new String(arr); fin new String(arr) return fin; fin String s s static long pow(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a;
        else {
            long R = pow(a,N/2);
            if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            }
        }
    } pow {
        if (N == 0) return 1;
        else if (N == 1) return a;
        else {
            long R = pow(a,N/2);
            if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            }
        }
    } if (N == 0) return 1;
        else if (N == 1) return a;
        else {
            long R = pow(a,N/2);
            if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            }
        } N == 0 N 0 return 1; 1 if (N == 1) return a;
        else {
            long R = pow(a,N/2);
            if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            }
        } N == 1 N 1 return a; a {
            long R = pow(a,N/2);
            if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            }
        } long R = pow(a,N/2); R pow(a,N/2) pow a N/2 N 2 if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            } N % 2 == 0 N % 2 N 2 0 {
                return R*R;
            } return R*R; R*R R R {
                return R*R*a;
            } return R*R*a; R*R*a R*R*a R R a long a a long N N static long powMod(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a % mod;
        else {
            long R = powMod(a,N/2) % mod;
            R *= R;
            R %= mod;
            if (N % 2 == 1) {
                R *= a;
                R %= mod;
            }
            return R % mod;
        }
    } powMod {
        if (N == 0) return 1;
        else if (N == 1) return a % mod;
        else {
            long R = powMod(a,N/2) % mod;
            R *= R;
            R %= mod;
            if (N % 2 == 1) {
                R *= a;
                R %= mod;
            }
            return R % mod;
        }
    } if (N == 0) return 1;
        else if (N == 1) return a % mod;
        else {
            long R = powMod(a,N/2) % mod;
            R *= R;
            R %= mod;
            if (N % 2 == 1) {
                R *= a;
                R %= mod;
            }
            return R % mod;
        } N == 0 N 0 return 1; 1 if (N == 1) return a % mod;
        else {
            long R = powMod(a,N/2) % mod;
            R *= R;
            R %= mod;
            if (N % 2 == 1) {
                R *= a;
                R %= mod;
            }
            return R % mod;
        } N == 1 N 1 return a % mod; a % mod a mod {
            long R = powMod(a,N/2) % mod;
            R *= R;
            R %= mod;
            if (N % 2 == 1) {
                R *= a;
                R %= mod;
            }
            return R % mod;
        } long R = powMod(a,N/2) % mod; R powMod(a,N/2) % mod powMod(a,N/2) powMod a N/2 N 2 mod R *= R R R R %= mod R mod if (N % 2 == 1) {
                R *= a;
                R %= mod;
            } N % 2 == 1 N % 2 N 2 1 {
                R *= a;
                R %= mod;
            } R *= a R a R %= mod R mod return R % mod; R % mod R mod long a a long N N public class Main {
    static long mod = (long)(Math.pow(10, 9) + 7);
    public static String alpha = "zabcdefghijklmnopqrstuvwxy";
    public static void main(String[] args) throws IOException{
        Scanner scan = new Scanner(System.in);
        long t = 1;
        //System.out.println(t);
        while (t-- > 0){
            int n = scan.nextInt();
            HashMap<String, Integer> map = new HashMap<>();
            map.put("AC", 0);
            map.put("TLE", 0);
            map.put("WA", 0);
            map.put("RE", 0);
            for(int i = 0; i<n; i++){
                String str= scan.next();
                map.put(str, map.get(str)+1);
            }
            System.out.println("AC x "+map.get("AC"));
            System.out.println("WA x "+map.get("WA"));
            System.out.println("TLE x "+map.get("TLE"));
            System.out.println("RE x "+map.get("RE"));
        }
        scan.close();

    }


    static boolean isPalindrome(String s){
        for(int i = 0; i<s.length()/2; i++){
            if(s.charAt(i) != s.charAt(s.length()-i-1)) return false;
        }
        return true;
    }

    static ArrayList factors(long n ){
        ArrayList<Long> facts = new ArrayList<>();
        for(int i = 1; i<=(int)Math.sqrt(n); i++){
            if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            }
        }
        Collections.sort(facts);
        return facts;
    }

    static boolean isPrime (int n){
        if(factors(n).size() ==2) return true;
        else return false;
    }





    static long GCD(long a, long b) {
        // Everything divides 0
        if (a == 0) return b;
        if (b == 0) return a;

        // base case
        if (a == b) return a;

        // a is greater
        if (a > b) return GCD(a-b, b);
        return GCD(a, b-a);
    }
    static long LCM(long a, long b){
        return (a*b)/(GCD(a,b));
    }
    static String rev(String s){
        char[] arr = s.toCharArray();
        for(int i = 0; i<(s.length()+1)/2; i++){
            char temp = arr[i];
            arr[i] = arr[s.length()-i-1];
            arr[s.length()-i-1] = temp;
        }
        String fin = new String(arr);
        return fin;
    }
    static long pow(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a;
        else {
            long R = pow(a,N/2);
            if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            }
        }
    }

    static long powMod(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a % mod;
        else {
            long R = powMod(a,N/2) % mod;
            R *= R;
            R %= mod;
            if (N % 2 == 1) {
                R *= a;
                R %= mod;
            }
            return R % mod;
        }
    }

} public class Main {
    static long mod = (long)(Math.pow(10, 9) + 7);
    public static String alpha = "zabcdefghijklmnopqrstuvwxy";
    public static void main(String[] args) throws IOException{
        Scanner scan = new Scanner(System.in);
        long t = 1;
        //System.out.println(t);
        while (t-- > 0){
            int n = scan.nextInt();
            HashMap<String, Integer> map = new HashMap<>();
            map.put("AC", 0);
            map.put("TLE", 0);
            map.put("WA", 0);
            map.put("RE", 0);
            for(int i = 0; i<n; i++){
                String str= scan.next();
                map.put(str, map.get(str)+1);
            }
            System.out.println("AC x "+map.get("AC"));
            System.out.println("WA x "+map.get("WA"));
            System.out.println("TLE x "+map.get("TLE"));
            System.out.println("RE x "+map.get("RE"));
        }
        scan.close();

    }


    static boolean isPalindrome(String s){
        for(int i = 0; i<s.length()/2; i++){
            if(s.charAt(i) != s.charAt(s.length()-i-1)) return false;
        }
        return true;
    }

    static ArrayList factors(long n ){
        ArrayList<Long> facts = new ArrayList<>();
        for(int i = 1; i<=(int)Math.sqrt(n); i++){
            if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            }
        }
        Collections.sort(facts);
        return facts;
    }

    static boolean isPrime (int n){
        if(factors(n).size() ==2) return true;
        else return false;
    }





    static long GCD(long a, long b) {
        // Everything divides 0
        if (a == 0) return b;
        if (b == 0) return a;

        // base case
        if (a == b) return a;

        // a is greater
        if (a > b) return GCD(a-b, b);
        return GCD(a, b-a);
    }
    static long LCM(long a, long b){
        return (a*b)/(GCD(a,b));
    }
    static String rev(String s){
        char[] arr = s.toCharArray();
        for(int i = 0; i<(s.length()+1)/2; i++){
            char temp = arr[i];
            arr[i] = arr[s.length()-i-1];
            arr[s.length()-i-1] = temp;
        }
        String fin = new String(arr);
        return fin;
    }
    static long pow(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a;
        else {
            long R = pow(a,N/2);
            if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            }
        }
    }

    static long powMod(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a % mod;
        else {
            long R = powMod(a,N/2) % mod;
            R *= R;
            R %= mod;
            if (N % 2 == 1) {
                R *= a;
                R %= mod;
            }
            return R % mod;
        }
    }

} Main
import java.lang.reflect.Array;
import java.util.*;
import java.io.* ;
/*
NOTES:
-more than 10 digits (10^10), use long
-prefix sum of 1's and -1's to control flow of highlighting a region
-log(a)/log(b) = log base b of a
-create a position array if trying to see if elements show up next to each other sequentially
 i.e. elements 1,2,3 are within 3 spots of each other in an array
      arr[scannedInt - 1] = i; (position of i at p[i] in original)
- use a freq array when counting instances of an element occurring
- increment the counter first before simulating anything turn-based (two player game)

 */

public class Main {
    static long mod = (long)(Math.pow(10, 9) + 7);
    public static String alpha = "zabcdefghijklmnopqrstuvwxy";
    public static void main(String[] args) throws IOException{
        Scanner scan = new Scanner(System.in);
        long t = 1;
        //System.out.println(t);
        while (t-- > 0){
            int n = scan.nextInt();
            HashMap<String, Integer> map = new HashMap<>();
            map.put("AC", 0);
            map.put("TLE", 0);
            map.put("WA", 0);
            map.put("RE", 0);
            for(int i = 0; i<n; i++){
                String str= scan.next();
                map.put(str, map.get(str)+1);
            }
            System.out.println("AC x "+map.get("AC"));
            System.out.println("WA x "+map.get("WA"));
            System.out.println("TLE x "+map.get("TLE"));
            System.out.println("RE x "+map.get("RE"));
        }
        scan.close();

    }


    static boolean isPalindrome(String s){
        for(int i = 0; i<s.length()/2; i++){
            if(s.charAt(i) != s.charAt(s.length()-i-1)) return false;
        }
        return true;
    }

    static ArrayList factors(long n ){
        ArrayList<Long> facts = new ArrayList<>();
        for(int i = 1; i<=(int)Math.sqrt(n); i++){
            if(n%i == 0){
                if( i == Math.sqrt(n)) facts.add((long)i);
                else{
                    facts.add((long)i);
                    facts.add(n/i);
                }
            }
        }
        Collections.sort(facts);
        return facts;
    }

    static boolean isPrime (int n){
        if(factors(n).size() ==2) return true;
        else return false;
    }





    static long GCD(long a, long b) {
        // Everything divides 0
        if (a == 0) return b;
        if (b == 0) return a;

        // base case
        if (a == b) return a;

        // a is greater
        if (a > b) return GCD(a-b, b);
        return GCD(a, b-a);
    }
    static long LCM(long a, long b){
        return (a*b)/(GCD(a,b));
    }
    static String rev(String s){
        char[] arr = s.toCharArray();
        for(int i = 0; i<(s.length()+1)/2; i++){
            char temp = arr[i];
            arr[i] = arr[s.length()-i-1];
            arr[s.length()-i-1] = temp;
        }
        String fin = new String(arr);
        return fin;
    }
    static long pow(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a;
        else {
            long R = pow(a,N/2);
            if (N % 2 == 0) {
                return R*R;
            }
            else {
                return R*R*a;
            }
        }
    }

    static long powMod(long a, long N) {
        if (N == 0) return 1;
        else if (N == 1) return a % mod;
        else {
            long R = powMod(a,N/2) % mod;
            R *= R;
            R %= mod;
            if (N % 2 == 1) {
                R *= a;
                R %= mod;
            }
            return R % mod;
        }
    }

}