import java.util.*;
import java.util.Map;
import java.util.Arrays;
import static java.util.stream.Collectors.*;
import static java.util.function.Function.*;
 
public class Main { //クラス名はMain
    public static void main(String[] args) {
      //整数の入力
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      
      //重複はSetでいい
      List<String> numList = new ArrayList<>();
      for (int i=0; i<n; i++) {
          String di = sc.next();
          numList.add(di);
      }

      
      Map<String, Long> map = numList.stream().collect(groupingBy(identity(), counting()));
      List<String> List = Arrays.asList("AC","WA","TLE","RE");
      for(String num : List){
        Long value = map.get(num);
        if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        }
      }
    }
} import java.util.*; util.* java import java.util.Map; Map java.util import java.util.Arrays; Arrays java.util import static java.util.stream.Collectors.*; import static java.util.stream.Collectors.*; import static java.util.stream.Collectors.*; import static java.util.function.Function.*; import static java.util.function.Function.*; import static java.util.function.Function.*; public class Main { //クラス名はMain
    public static void main(String[] args) {
      //整数の入力
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      
      //重複はSetでいい
      List<String> numList = new ArrayList<>();
      for (int i=0; i<n; i++) {
          String di = sc.next();
          numList.add(di);
      }

      
      Map<String, Long> map = numList.stream().collect(groupingBy(identity(), counting()));
      List<String> List = Arrays.asList("AC","WA","TLE","RE");
      for(String num : List){
        Long value = map.get(num);
        if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        }
      }
    }
} Main public static void main(String[] args) {
      //整数の入力
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      
      //重複はSetでいい
      List<String> numList = new ArrayList<>();
      for (int i=0; i<n; i++) {
          String di = sc.next();
          numList.add(di);
      }

      
      Map<String, Long> map = numList.stream().collect(groupingBy(identity(), counting()));
      List<String> List = Arrays.asList("AC","WA","TLE","RE");
      for(String num : List){
        Long value = map.get(num);
        if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        }
      }
    } main {
      //整数の入力
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      
      //重複はSetでいい
      List<String> numList = new ArrayList<>();
      for (int i=0; i<n; i++) {
          String di = sc.next();
          numList.add(di);
      }

      
      Map<String, Long> map = numList.stream().collect(groupingBy(identity(), counting()));
      List<String> List = Arrays.asList("AC","WA","TLE","RE");
      for(String num : List){
        Long value = map.get(num);
        if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        }
      }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc List<String> numList = new ArrayList<>(); numList new ArrayList<>() for (int i=0; i<n; i++) {
          String di = sc.next();
          numList.add(di);
      } int i=0; int i=0; i 0 i<n i n i++ i++ i {
          String di = sc.next();
          numList.add(di);
      } {
          String di = sc.next();
          numList.add(di);
      } String di = sc.next(); di sc.next() sc.next sc numList.add(di) numList.add numList di Map<String, Long> map = numList.stream().collect(groupingBy(identity(), counting())); map numList.stream().collect(groupingBy(identity(), counting())) numList.stream().collect numList.stream() numList.stream numList groupingBy(identity(), counting()) groupingBy identity() identity counting() counting List<String> List = Arrays.asList("AC","WA","TLE","RE"); List Arrays.asList("AC","WA","TLE","RE") Arrays.asList Arrays "AC" "WA" "TLE" "RE" for(String num : List){
        Long value = map.get(num);
        if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        }
      } String num List {
        Long value = map.get(num);
        if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        }
      } {
        Long value = map.get(num);
        if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        }
      } Long value = map.get(num); value map.get(num) map.get map num if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        } value != null value null {
      		System.out.println(num + " x " + map.get(num));
        } System.out.println(num + " x " + map.get(num)) System.out.println System.out System System.out num + " x " + map.get(num) num + " x " + map.get(num) num " x " map.get(num) map.get map num {
        	System.out.println(num + " x " + 0);
        } System.out.println(num + " x " + 0) System.out.println System.out System System.out num + " x " + 0 num + " x " + 0 num " x " 0 String[] args args public class Main { //クラス名はMain
    public static void main(String[] args) {
      //整数の入力
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      
      //重複はSetでいい
      List<String> numList = new ArrayList<>();
      for (int i=0; i<n; i++) {
          String di = sc.next();
          numList.add(di);
      }

      
      Map<String, Long> map = numList.stream().collect(groupingBy(identity(), counting()));
      List<String> List = Arrays.asList("AC","WA","TLE","RE");
      for(String num : List){
        Long value = map.get(num);
        if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        }
      }
    }
} public class Main { //クラス名はMain
    public static void main(String[] args) {
      //整数の入力
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      
      //重複はSetでいい
      List<String> numList = new ArrayList<>();
      for (int i=0; i<n; i++) {
          String di = sc.next();
          numList.add(di);
      }

      
      Map<String, Long> map = numList.stream().collect(groupingBy(identity(), counting()));
      List<String> List = Arrays.asList("AC","WA","TLE","RE");
      for(String num : List){
        Long value = map.get(num);
        if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        }
      }
    }
} Main
import java.util.*;
import java.util.Map;
import java.util.Arrays;
import static java.util.stream.Collectors.*;
import static java.util.function.Function.*;
 
public class Main { //クラス名はMain
    public static void main(String[] args) {
      //整数の入力
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      
      //重複はSetでいい
      List<String> numList = new ArrayList<>();
      for (int i=0; i<n; i++) {
          String di = sc.next();
          numList.add(di);
      }

      
      Map<String, Long> map = numList.stream().collect(groupingBy(identity(), counting()));
      List<String> List = Arrays.asList("AC","WA","TLE","RE");
      for(String num : List){
        Long value = map.get(num);
        if(value != null){
      		System.out.println(num + " x " + map.get(num));
        }else{
        	System.out.println(num + " x " + 0);
        }
      }
    }
}