import java.io.*;
import java.math.BigInteger;
import java.util.*;

class Main{
    public static void main(String[] args){
        try {
            PrintWriter out=new PrintWriter(System.out,true);
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            int t=Integer.parseInt(br.readLine());
            Map<String,Integer> map=new HashMap<>();
            map.put("AC",0);
            map.put("RE",0);
            map.put("TLE",0);
            map.put("WA",0);
            for(int i=0;i<t;i++){
                String str=br.readLine();
                map.put(str,map.get(str)+1);
            }
            out.println("AC x "+map.get("AC"));
            out.println("WA x "+map.get("WA"));
            out.println("TLE x "+map.get("TLE"));
            out.println("RE x "+map.get("RE"));
            out.close();
        } catch (Exception e) {
            System.out.println("kkkk "+ e.getMessage());
        }
    }
    static boolean isPal(String s){
        StringBuilder str=new StringBuilder(s);
        str=str.reverse();
        String ss=String.valueOf(str);
        if (ss.equals(s)) {
            return true;
        }
        return false;
    }
    static int mod(int a,int b){
        if (a>b){
            return a-b;
        }
        return b-a;
    }
    static void shuffle(int[] a) {
        Random get = new Random();
        for (int i = 0; i < a.length; i++) {
            int r = get.nextInt(a.length);
            int temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        }
    }
    static int lcm(int a,int b){
        long c=a*b;
        return (int)(c/hcf(a,b));
    }
    static int hcf(int a,int b){
        if(a==0){
            return b;
        }
        if(b==0){
            return a;
        }
        if(a>b)
            return hcf(a%b,b);

        return hcf(a,b%a);
    }
    static void dfs(ArrayList<HashSet<Integer>> list,boolean[] vis,int i){
        vis[i]=true;
        Iterator<Integer> it=list.get(i).iterator();
        while(it.hasNext()){
            int u=it.next();
            if(!vis[u]){
                dfs(list,vis,u);
            }
        }
    }
    static int modInverse(int x,int m){
        return power(x,m-2,m);
    }
    static int power(int x, int y, int m)
    {
        if (y == 0)
            return 1;

        long p = power(x, y / 2, m) % m;
        p = (p * p) % m;

        return (int)((y%2==0)? p : (x*p)%m);
    }
    static class pair{
        int a,b;
        public pair(int a,int b){
            this.a=a;
            this.b=b;
        }
    }
} import java.io.*; io.* java import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java class Main{
    public static void main(String[] args){
        try {
            PrintWriter out=new PrintWriter(System.out,true);
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            int t=Integer.parseInt(br.readLine());
            Map<String,Integer> map=new HashMap<>();
            map.put("AC",0);
            map.put("RE",0);
            map.put("TLE",0);
            map.put("WA",0);
            for(int i=0;i<t;i++){
                String str=br.readLine();
                map.put(str,map.get(str)+1);
            }
            out.println("AC x "+map.get("AC"));
            out.println("WA x "+map.get("WA"));
            out.println("TLE x "+map.get("TLE"));
            out.println("RE x "+map.get("RE"));
            out.close();
        } catch (Exception e) {
            System.out.println("kkkk "+ e.getMessage());
        }
    }
    static boolean isPal(String s){
        StringBuilder str=new StringBuilder(s);
        str=str.reverse();
        String ss=String.valueOf(str);
        if (ss.equals(s)) {
            return true;
        }
        return false;
    }
    static int mod(int a,int b){
        if (a>b){
            return a-b;
        }
        return b-a;
    }
    static void shuffle(int[] a) {
        Random get = new Random();
        for (int i = 0; i < a.length; i++) {
            int r = get.nextInt(a.length);
            int temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        }
    }
    static int lcm(int a,int b){
        long c=a*b;
        return (int)(c/hcf(a,b));
    }
    static int hcf(int a,int b){
        if(a==0){
            return b;
        }
        if(b==0){
            return a;
        }
        if(a>b)
            return hcf(a%b,b);

        return hcf(a,b%a);
    }
    static void dfs(ArrayList<HashSet<Integer>> list,boolean[] vis,int i){
        vis[i]=true;
        Iterator<Integer> it=list.get(i).iterator();
        while(it.hasNext()){
            int u=it.next();
            if(!vis[u]){
                dfs(list,vis,u);
            }
        }
    }
    static int modInverse(int x,int m){
        return power(x,m-2,m);
    }
    static int power(int x, int y, int m)
    {
        if (y == 0)
            return 1;

        long p = power(x, y / 2, m) % m;
        p = (p * p) % m;

        return (int)((y%2==0)? p : (x*p)%m);
    }
    static class pair{
        int a,b;
        public pair(int a,int b){
            this.a=a;
            this.b=b;
        }
    }
} Main public static void main(String[] args){
        try {
            PrintWriter out=new PrintWriter(System.out,true);
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            int t=Integer.parseInt(br.readLine());
            Map<String,Integer> map=new HashMap<>();
            map.put("AC",0);
            map.put("RE",0);
            map.put("TLE",0);
            map.put("WA",0);
            for(int i=0;i<t;i++){
                String str=br.readLine();
                map.put(str,map.get(str)+1);
            }
            out.println("AC x "+map.get("AC"));
            out.println("WA x "+map.get("WA"));
            out.println("TLE x "+map.get("TLE"));
            out.println("RE x "+map.get("RE"));
            out.close();
        } catch (Exception e) {
            System.out.println("kkkk "+ e.getMessage());
        }
    } main {
        try {
            PrintWriter out=new PrintWriter(System.out,true);
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            int t=Integer.parseInt(br.readLine());
            Map<String,Integer> map=new HashMap<>();
            map.put("AC",0);
            map.put("RE",0);
            map.put("TLE",0);
            map.put("WA",0);
            for(int i=0;i<t;i++){
                String str=br.readLine();
                map.put(str,map.get(str)+1);
            }
            out.println("AC x "+map.get("AC"));
            out.println("WA x "+map.get("WA"));
            out.println("TLE x "+map.get("TLE"));
            out.println("RE x "+map.get("RE"));
            out.close();
        } catch (Exception e) {
            System.out.println("kkkk "+ e.getMessage());
        }
    } try {
            PrintWriter out=new PrintWriter(System.out,true);
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            int t=Integer.parseInt(br.readLine());
            Map<String,Integer> map=new HashMap<>();
            map.put("AC",0);
            map.put("RE",0);
            map.put("TLE",0);
            map.put("WA",0);
            for(int i=0;i<t;i++){
                String str=br.readLine();
                map.put(str,map.get(str)+1);
            }
            out.println("AC x "+map.get("AC"));
            out.println("WA x "+map.get("WA"));
            out.println("TLE x "+map.get("TLE"));
            out.println("RE x "+map.get("RE"));
            out.close();
        } catch (Exception e) {
            System.out.println("kkkk "+ e.getMessage());
        } catch (Exception e) {
            System.out.println("kkkk "+ e.getMessage());
        } Exception e {
            System.out.println("kkkk "+ e.getMessage());
        } System.out.println("kkkk "+ e.getMessage()) System.out.println System.out System System.out "kkkk "+ e.getMessage() "kkkk " e.getMessage() e.getMessage e {
            PrintWriter out=new PrintWriter(System.out,true);
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            int t=Integer.parseInt(br.readLine());
            Map<String,Integer> map=new HashMap<>();
            map.put("AC",0);
            map.put("RE",0);
            map.put("TLE",0);
            map.put("WA",0);
            for(int i=0;i<t;i++){
                String str=br.readLine();
                map.put(str,map.get(str)+1);
            }
            out.println("AC x "+map.get("AC"));
            out.println("WA x "+map.get("WA"));
            out.println("TLE x "+map.get("TLE"));
            out.println("RE x "+map.get("RE"));
            out.close();
        } PrintWriter out=new PrintWriter(System.out,true); out new PrintWriter(System.out,true) BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int t=Integer.parseInt(br.readLine()); t Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br Map<String,Integer> map=new HashMap<>(); map new HashMap<>() map.put("AC",0) map.put map "AC" 0 map.put("RE",0) map.put map "RE" 0 map.put("TLE",0) map.put map "TLE" 0 map.put("WA",0) map.put map "WA" 0 for(int i=0;i<t;i++){
                String str=br.readLine();
                map.put(str,map.get(str)+1);
            } int i=0; int i=0; i 0 i<t i t i++ i++ i {
                String str=br.readLine();
                map.put(str,map.get(str)+1);
            } {
                String str=br.readLine();
                map.put(str,map.get(str)+1);
            } String str=br.readLine(); str br.readLine() br.readLine br map.put(str,map.get(str)+1) map.put map str map.get(str)+1 map.get(str) map.get map str 1 out.println("AC x "+map.get("AC")) out.println out "AC x "+map.get("AC") "AC x " map.get("AC") map.get map "AC" out.println("WA x "+map.get("WA")) out.println out "WA x "+map.get("WA") "WA x " map.get("WA") map.get map "WA" out.println("TLE x "+map.get("TLE")) out.println out "TLE x "+map.get("TLE") "TLE x " map.get("TLE") map.get map "TLE" out.println("RE x "+map.get("RE")) out.println out "RE x "+map.get("RE") "RE x " map.get("RE") map.get map "RE" out.close() out.close out String[] args args static boolean isPal(String s){
        StringBuilder str=new StringBuilder(s);
        str=str.reverse();
        String ss=String.valueOf(str);
        if (ss.equals(s)) {
            return true;
        }
        return false;
    } isPal {
        StringBuilder str=new StringBuilder(s);
        str=str.reverse();
        String ss=String.valueOf(str);
        if (ss.equals(s)) {
            return true;
        }
        return false;
    } StringBuilder str=new StringBuilder(s); str new StringBuilder(s) str=str.reverse() str str.reverse() str.reverse str String ss=String.valueOf(str); ss String.valueOf(str) String.valueOf String str if (ss.equals(s)) {
            return true;
        } ss.equals(s) ss.equals ss s {
            return true;
        } return true; true return false; false String s s static int mod(int a,int b){
        if (a>b){
            return a-b;
        }
        return b-a;
    } mod {
        if (a>b){
            return a-b;
        }
        return b-a;
    } if (a>b){
            return a-b;
        } a>b a b {
            return a-b;
        } return a-b; a-b a b return b-a; b-a b a int a a int b b static void shuffle(int[] a) {
        Random get = new Random();
        for (int i = 0; i < a.length; i++) {
            int r = get.nextInt(a.length);
            int temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        }
    } shuffle {
        Random get = new Random();
        for (int i = 0; i < a.length; i++) {
            int r = get.nextInt(a.length);
            int temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        }
    } Random get = new Random(); get new Random() for (int i = 0; i < a.length; i++) {
            int r = get.nextInt(a.length);
            int temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        } int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i {
            int r = get.nextInt(a.length);
            int temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        } {
            int r = get.nextInt(a.length);
            int temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        } int r = get.nextInt(a.length); r get.nextInt(a.length) get.nextInt get a.length a a.length int temp = a[i]; temp a[i] a i a[i] = a[r] a[i] a i a[r] a r a[r] = temp a[r] a r temp int[] a a static int lcm(int a,int b){
        long c=a*b;
        return (int)(c/hcf(a,b));
    } lcm {
        long c=a*b;
        return (int)(c/hcf(a,b));
    } long c=a*b; c a*b a b return (int)(c/hcf(a,b)); (int)(c/hcf(a,b)) c hcf(a,b) hcf a b int a a int b b static int hcf(int a,int b){
        if(a==0){
            return b;
        }
        if(b==0){
            return a;
        }
        if(a>b)
            return hcf(a%b,b);

        return hcf(a,b%a);
    } hcf {
        if(a==0){
            return b;
        }
        if(b==0){
            return a;
        }
        if(a>b)
            return hcf(a%b,b);

        return hcf(a,b%a);
    } if(a==0){
            return b;
        } a==0 a 0 {
            return b;
        } return b; b if(b==0){
            return a;
        } b==0 b 0 {
            return a;
        } return a; a if(a>b)
            return hcf(a%b,b); a>b a b return hcf(a%b,b); hcf(a%b,b) hcf a%b a b b return hcf(a,b%a); hcf(a,b%a) hcf a b%a b a int a a int b b static void dfs(ArrayList<HashSet<Integer>> list,boolean[] vis,int i){
        vis[i]=true;
        Iterator<Integer> it=list.get(i).iterator();
        while(it.hasNext()){
            int u=it.next();
            if(!vis[u]){
                dfs(list,vis,u);
            }
        }
    } dfs {
        vis[i]=true;
        Iterator<Integer> it=list.get(i).iterator();
        while(it.hasNext()){
            int u=it.next();
            if(!vis[u]){
                dfs(list,vis,u);
            }
        }
    } vis[i]=true vis[i] vis i true Iterator<Integer> it=list.get(i).iterator(); it list.get(i).iterator() list.get(i).iterator list.get(i) list.get list i while(it.hasNext()){
            int u=it.next();
            if(!vis[u]){
                dfs(list,vis,u);
            }
        } it.hasNext() it.hasNext it {
            int u=it.next();
            if(!vis[u]){
                dfs(list,vis,u);
            }
        } int u=it.next(); u it.next() it.next it if(!vis[u]){
                dfs(list,vis,u);
            } !vis[u] vis[u] vis u {
                dfs(list,vis,u);
            } dfs(list,vis,u) dfs list vis u ArrayList<HashSet<Integer>> list list boolean[] vis vis int i i static int modInverse(int x,int m){
        return power(x,m-2,m);
    } modInverse {
        return power(x,m-2,m);
    } return power(x,m-2,m); power(x,m-2,m) power x m-2 m 2 m int x x int m m static int power(int x, int y, int m)
    {
        if (y == 0)
            return 1;

        long p = power(x, y / 2, m) % m;
        p = (p * p) % m;

        return (int)((y%2==0)? p : (x*p)%m);
    } power {
        if (y == 0)
            return 1;

        long p = power(x, y / 2, m) % m;
        p = (p * p) % m;

        return (int)((y%2==0)? p : (x*p)%m);
    } if (y == 0)
            return 1; y == 0 y 0 return 1; 1 long p = power(x, y / 2, m) % m; p power(x, y / 2, m) % m power(x, y / 2, m) power x y / 2 y 2 m m p = (p * p) % m p (p * p) % m (p * p) p p m return (int)((y%2==0)? p : (x*p)%m); (int)((y%2==0)? p : (x*p)%m) (y%2==0) y%2 y 2 0 p (x*p)%m (x*p) x p m int x x int y y int m m static class pair{
        int a,b;
        public pair(int a,int b){
            this.a=a;
            this.b=b;
        }
    } pair int a a b; b public pair(int a,int b){
            this.a=a;
            this.b=b;
        } pair {
            this.a=a;
            this.b=b;
        } this.a=a this.a this this.a a this.b=b this.b this this.b b int a a int b b
import java.io.*;
import java.math.BigInteger;
import java.util.*;

class Main{
    public static void main(String[] args){
        try {
            PrintWriter out=new PrintWriter(System.out,true);
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            int t=Integer.parseInt(br.readLine());
            Map<String,Integer> map=new HashMap<>();
            map.put("AC",0);
            map.put("RE",0);
            map.put("TLE",0);
            map.put("WA",0);
            for(int i=0;i<t;i++){
                String str=br.readLine();
                map.put(str,map.get(str)+1);
            }
            out.println("AC x "+map.get("AC"));
            out.println("WA x "+map.get("WA"));
            out.println("TLE x "+map.get("TLE"));
            out.println("RE x "+map.get("RE"));
            out.close();
        } catch (Exception e) {
            System.out.println("kkkk "+ e.getMessage());
        }
    }
    static boolean isPal(String s){
        StringBuilder str=new StringBuilder(s);
        str=str.reverse();
        String ss=String.valueOf(str);
        if (ss.equals(s)) {
            return true;
        }
        return false;
    }
    static int mod(int a,int b){
        if (a>b){
            return a-b;
        }
        return b-a;
    }
    static void shuffle(int[] a) {
        Random get = new Random();
        for (int i = 0; i < a.length; i++) {
            int r = get.nextInt(a.length);
            int temp = a[i];
            a[i] = a[r];
            a[r] = temp;
        }
    }
    static int lcm(int a,int b){
        long c=a*b;
        return (int)(c/hcf(a,b));
    }
    static int hcf(int a,int b){
        if(a==0){
            return b;
        }
        if(b==0){
            return a;
        }
        if(a>b)
            return hcf(a%b,b);

        return hcf(a,b%a);
    }
    static void dfs(ArrayList<HashSet<Integer>> list,boolean[] vis,int i){
        vis[i]=true;
        Iterator<Integer> it=list.get(i).iterator();
        while(it.hasNext()){
            int u=it.next();
            if(!vis[u]){
                dfs(list,vis,u);
            }
        }
    }
    static int modInverse(int x,int m){
        return power(x,m-2,m);
    }
    static int power(int x, int y, int m)
    {
        if (y == 0)
            return 1;

        long p = power(x, y / 2, m) % m;
        p = (p * p) % m;

        return (int)((y%2==0)? p : (x*p)%m);
    }
    static class pair{
        int a,b;
        public pair(int a,int b){
            this.a=a;
            this.b=b;
        }
    }
}