import javax.sound.midi.Soundbank;
import java.util.*;
import java.lang.*;

public class Main
{
    static boolean isThere(int[] a, int x)
    {
        for(int i=0; i<a.length; i++)
        {
            if(a[i]==x)
                return true;
        }
        return false;
    }
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int a = 0, w = 0, t = 0, r = 0;
        for(int i=0; i<n; i++)
        {
            String x = s.next();
            if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++;
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }
} import javax.sound.midi.Soundbank; Soundbank javax.sound.midi import java.util.*; util.* java import java.lang.*; lang.* java public class Main
{
    static boolean isThere(int[] a, int x)
    {
        for(int i=0; i<a.length; i++)
        {
            if(a[i]==x)
                return true;
        }
        return false;
    }
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int a = 0, w = 0, t = 0, r = 0;
        for(int i=0; i<n; i++)
        {
            String x = s.next();
            if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++;
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }
} Main static boolean isThere(int[] a, int x)
    {
        for(int i=0; i<a.length; i++)
        {
            if(a[i]==x)
                return true;
        }
        return false;
    } isThere {
        for(int i=0; i<a.length; i++)
        {
            if(a[i]==x)
                return true;
        }
        return false;
    } for(int i=0; i<a.length; i++)
        {
            if(a[i]==x)
                return true;
        } int i=0; int i=0; i 0 i<a.length i a.length a a.length i++ i++ i {
            if(a[i]==x)
                return true;
        } {
            if(a[i]==x)
                return true;
        } if(a[i]==x)
                return true; a[i]==x a[i] a i x return true; true return false; false int[] a a int x x public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int a = 0, w = 0, t = 0, r = 0;
        for(int i=0; i<n; i++)
        {
            String x = s.next();
            if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++;
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    } main {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int a = 0, w = 0, t = 0, r = 0;
        for(int i=0; i<n; i++)
        {
            String x = s.next();
            if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++;
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int a = 0 a 0 w = 0 w 0 t = 0 t 0 r = 0; r 0 for(int i=0; i<n; i++)
        {
            String x = s.next();
            if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            String x = s.next();
            if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++;
        } {
            String x = s.next();
            if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++;
        } String x = s.next(); x s.next() s.next s if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++; x.equals("AC") x.equals x "AC" a++ a if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++; x.equals("WA") x.equals x "WA" w++ w if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++; x.equals("TLE") x.equals x "TLE" t++ t if(x.equals("RE"))
                r++; x.equals("RE") x.equals x "RE" r++ r System.out.println("AC x "+a) System.out.println System.out System System.out "AC x "+a "AC x " a System.out.println("WA x "+w) System.out.println System.out System System.out "WA x "+w "WA x " w System.out.println("TLE x "+t) System.out.println System.out System System.out "TLE x "+t "TLE x " t System.out.println("RE x "+r) System.out.println System.out System System.out "RE x "+r "RE x " r String[] args args public class Main
{
    static boolean isThere(int[] a, int x)
    {
        for(int i=0; i<a.length; i++)
        {
            if(a[i]==x)
                return true;
        }
        return false;
    }
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int a = 0, w = 0, t = 0, r = 0;
        for(int i=0; i<n; i++)
        {
            String x = s.next();
            if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++;
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }
} public class Main
{
    static boolean isThere(int[] a, int x)
    {
        for(int i=0; i<a.length; i++)
        {
            if(a[i]==x)
                return true;
        }
        return false;
    }
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int a = 0, w = 0, t = 0, r = 0;
        for(int i=0; i<n; i++)
        {
            String x = s.next();
            if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++;
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }
} Main
import javax.sound.midi.Soundbank;
import java.util.*;
import java.lang.*;

public class Main
{
    static boolean isThere(int[] a, int x)
    {
        for(int i=0; i<a.length; i++)
        {
            if(a[i]==x)
                return true;
        }
        return false;
    }
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int a = 0, w = 0, t = 0, r = 0;
        for(int i=0; i<n; i++)
        {
            String x = s.next();
            if(x.equals("AC"))
                a++;
            else if(x.equals("WA"))
                w++;
            else if(x.equals("TLE"))
                t++;
            else if(x.equals("RE"))
                r++;
        }
        System.out.println("AC x "+a);
        System.out.println("WA x "+w);
        System.out.println("TLE x "+t);
        System.out.println("RE x "+r);
    }
}
