Billboard
To promote its new product in China, a company has decided to install a billboard on a skyscraper. This billboard is made up of light bulbs arranged in a rectangular grid with n rows and m columns. At any given time, each bulb can either be on or off.
The advertisement consists of k characters, displayed sequentially. For each character, there is a specific pattern indicating which bulbs should be on, while the rest should remain off.
A specialized system is being developed to manage the billboard. This system can control the bulbs by turning them on or off in entire groups. The bulbs are divided into several groups such that, for each character, all bulbs in a group must be either entirely on or entirely off.
To enhance the efficiency of the control system, it is crucial to minimize the number of such groups. Assist the company's advertising department in solving this problem.
Input
The first line contains the integers k, n, and m (1 ≤ k, n, m ≤ 100) - representing the number of characters in the advertisement, the height, and the width of the billboard, respectively.
The subsequent k * n lines describe the characters. Each of the k characters is represented by n rows of m symbols each. These rows consist solely of the symbols "*" and ".", where "*" indicates a bulb that is on, and "." indicates a bulb that is off.
Output
Output the minimum number of groups into which the bulbs can be divided.
Example Explanation
In the provided example, the bulbs can be grouped as follows: two bulbs from the first column form one group, two bulbs from the last column form another group, and each of the two remaining bulbs forms its own group.