#C14212. Case-Insensitive String Counting

    ID: 43837 Type: Default 1000ms 256MiB

Case-Insensitive String Counting

Case-Insensitive String Counting

Given a list of strings, count the frequency of each string in a case-insensitive manner. Two strings that differ only by their letter cases (for example, Apple, apple, and APPLE) are considered the same.

Let $N$ denote the number of strings. You are required to output each distinct string (in lowercase) along with its frequency. The output should be sorted in lexicographical order based on the string.

Example:

Input:
5
apple
Banana
apple
banana
Apple

Output: apple 3 banana 2

</p>

inputFormat

The first line contains an integer N ($1 \le N \le 10^5$), representing the number of strings.

Each of the following N lines contains a single string.

outputFormat

For each distinct string (converted to lowercase), output a line containing the string and its count separated by a space. The output lines must be in lexicographical order according to the string.

## sample
5
apple
Banana
apple
banana
Apple
apple 3

banana 2

</p>