Crossword#505

Crossword

1 second
64 megabytes
Very easy

You drew a grid for a crossword puzzle, and now need to fill it with words. To do this, you need to know how many words of each length are present in the crossword. Write a program that performs these calculations.

Input

The input file contains several tests. The first line of each test contains two integers and separated by a space—the dimensions of the crossword grid (3 \leq N \leq 50, 3 \leq M \leq 50). This is followed by lines, each containing symbols: '.' (empty cell) and 'X' (black, unused cell). A line containing signals the end of the test set and should not be processed.

Output

For each test, output a line containing information about the number of words of each length in the form L-K, separated by spaces and in increasing order of , where is the word length (L \geq 2), and is the number of words of that length (K > 0).

Examples

Example 1

Loading
Loading