Олимпиадный тренинг

Задача 38255. Beautiful numbers


Задача

Темы: Хеш
In one small country, it was allowed to open offshore companies, and entrepreneurs immediately rushed there with the desire to open their own company in it.

Since all firms are modern and keep up with the times, they need to contact customers and business partners, which means they need a phone number.


Thus, each letter corresponds to a certain number, and instead of a telephone number, it is enough to know the word whose letters correspond to the digits of the number.

Every company wants their phone number to be easy to remember. If the company name typed on the phone matches the company phone number, the number is very easy to remember and no customer will ever forget it.

Since there are so many companies, not all companies may be able to get a convenient number. Write a program that will determine the largest number of firms that can get such a number.

Input
The first line contains an integer N — number of new firms (1 ≤ N ≤ 103).

In the next N lines enter the names of firms. The name of each company consists of seven lowercase Latin letters. It is guaranteed that the names of all firms are different.

Imprint
Print one number — the maximum number of firms that can get a convenient number.
Examples
# Input Output
1 4
lacoste
hyundai
renault
peugeot
4
2 3
aaaaaaa
bbbbbbb
ccccccc
1