import java.util.Scanner;

/**
 * B - Judge Status Summary
 *
 */
public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        int n = sc.nextInt();   // 提出数
        // 結果
        int totalAcCnt = 0;
        int totalWaCnt = 0;
        int totalTleCnt = 0;
        int totalReCnt = 0;
        for( int i = 0; i < n; i++ ) {
            String s = sc.next();
            if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt;
        }

        StringBuffer sb = new StringBuffer();
        sb.append( "AC x " ).append( totalAcCnt );
        sb.append( "\nWA x " ).append( totalWaCnt );
        sb.append( "\nTLE x " ).append( totalTleCnt );
        sb.append( "\nRE x " ).append( totalReCnt );

        System.out.println( sb.toString() );

        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        int n = sc.nextInt();   // 提出数
        // 結果
        int totalAcCnt = 0;
        int totalWaCnt = 0;
        int totalTleCnt = 0;
        int totalReCnt = 0;
        for( int i = 0; i < n; i++ ) {
            String s = sc.next();
            if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt;
        }

        StringBuffer sb = new StringBuffer();
        sb.append( "AC x " ).append( totalAcCnt );
        sb.append( "\nWA x " ).append( totalWaCnt );
        sb.append( "\nTLE x " ).append( totalTleCnt );
        sb.append( "\nRE x " ).append( totalReCnt );

        System.out.println( sb.toString() );

        sc.close();
    }
} Main public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        int n = sc.nextInt();   // 提出数
        // 結果
        int totalAcCnt = 0;
        int totalWaCnt = 0;
        int totalTleCnt = 0;
        int totalReCnt = 0;
        for( int i = 0; i < n; i++ ) {
            String s = sc.next();
            if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt;
        }

        StringBuffer sb = new StringBuffer();
        sb.append( "AC x " ).append( totalAcCnt );
        sb.append( "\nWA x " ).append( totalWaCnt );
        sb.append( "\nTLE x " ).append( totalTleCnt );
        sb.append( "\nRE x " ).append( totalReCnt );

        System.out.println( sb.toString() );

        sc.close();
    } main {

        Scanner sc = new Scanner( System.in );
        // 入力値
        int n = sc.nextInt();   // 提出数
        // 結果
        int totalAcCnt = 0;
        int totalWaCnt = 0;
        int totalTleCnt = 0;
        int totalReCnt = 0;
        for( int i = 0; i < n; i++ ) {
            String s = sc.next();
            if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt;
        }

        StringBuffer sb = new StringBuffer();
        sb.append( "AC x " ).append( totalAcCnt );
        sb.append( "\nWA x " ).append( totalWaCnt );
        sb.append( "\nTLE x " ).append( totalTleCnt );
        sb.append( "\nRE x " ).append( totalReCnt );

        System.out.println( sb.toString() );

        sc.close();
    } Scanner sc = new Scanner( System.in ); sc new Scanner( System.in ) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int totalAcCnt = 0; totalAcCnt 0 int totalWaCnt = 0; totalWaCnt 0 int totalTleCnt = 0; totalTleCnt 0 int totalReCnt = 0; totalReCnt 0 for( int i = 0; i < n; i++ ) {
            String s = sc.next();
            if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String s = sc.next();
            if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt;
        } {
            String s = sc.next();
            if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt;
        } String s = sc.next(); s sc.next() sc.next sc if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt; s.equals( "AC" ) s.equals s "AC" ++totalAcCnt totalAcCnt if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt; s.equals( "WA" ) s.equals s "WA" ++ totalWaCnt totalWaCnt if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt; s.equals( "TLE" ) s.equals s "TLE" ++ totalTleCnt totalTleCnt ++totalReCnt totalReCnt StringBuffer sb = new StringBuffer(); sb new StringBuffer() sb.append( "AC x " ).append( totalAcCnt ) sb.append( "AC x " ).append sb.append( "AC x " ) sb.append sb "AC x " totalAcCnt sb.append( "\nWA x " ).append( totalWaCnt ) sb.append( "\nWA x " ).append sb.append( "\nWA x " ) sb.append sb "\nWA x " totalWaCnt sb.append( "\nTLE x " ).append( totalTleCnt ) sb.append( "\nTLE x " ).append sb.append( "\nTLE x " ) sb.append sb "\nTLE x " totalTleCnt sb.append( "\nRE x " ).append( totalReCnt ) sb.append( "\nRE x " ).append sb.append( "\nRE x " ) sb.append sb "\nRE x " totalReCnt System.out.println( sb.toString() ) System.out.println System.out System System.out sb.toString() sb.toString sb sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        int n = sc.nextInt();   // 提出数
        // 結果
        int totalAcCnt = 0;
        int totalWaCnt = 0;
        int totalTleCnt = 0;
        int totalReCnt = 0;
        for( int i = 0; i < n; i++ ) {
            String s = sc.next();
            if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt;
        }

        StringBuffer sb = new StringBuffer();
        sb.append( "AC x " ).append( totalAcCnt );
        sb.append( "\nWA x " ).append( totalWaCnt );
        sb.append( "\nTLE x " ).append( totalTleCnt );
        sb.append( "\nRE x " ).append( totalReCnt );

        System.out.println( sb.toString() );

        sc.close();
    }
} public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        int n = sc.nextInt();   // 提出数
        // 結果
        int totalAcCnt = 0;
        int totalWaCnt = 0;
        int totalTleCnt = 0;
        int totalReCnt = 0;
        for( int i = 0; i < n; i++ ) {
            String s = sc.next();
            if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt;
        }

        StringBuffer sb = new StringBuffer();
        sb.append( "AC x " ).append( totalAcCnt );
        sb.append( "\nWA x " ).append( totalWaCnt );
        sb.append( "\nTLE x " ).append( totalTleCnt );
        sb.append( "\nRE x " ).append( totalReCnt );

        System.out.println( sb.toString() );

        sc.close();
    }
} Main
import java.util.Scanner;

/**
 * B - Judge Status Summary
 *
 */
public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // 入力値
        int n = sc.nextInt();   // 提出数
        // 結果
        int totalAcCnt = 0;
        int totalWaCnt = 0;
        int totalTleCnt = 0;
        int totalReCnt = 0;
        for( int i = 0; i < n; i++ ) {
            String s = sc.next();
            if( s.equals( "AC" ) ) ++totalAcCnt;
            else if( s.equals( "WA" ) ) ++ totalWaCnt;
            else if( s.equals( "TLE" ) ) ++ totalTleCnt;
            else ++totalReCnt;
        }

        StringBuffer sb = new StringBuffer();
        sb.append( "AC x " ).append( totalAcCnt );
        sb.append( "\nWA x " ).append( totalWaCnt );
        sb.append( "\nTLE x " ).append( totalTleCnt );
        sb.append( "\nRE x " ).append( totalReCnt );

        System.out.println( sb.toString() );

        sc.close();
    }
}