Chaos and the Stonki

No attempts yetTime limit1sMemory limit128 MB

Problem

Chairman Stonkony wants to find out how many members his organization has. He ordered every member to sign an attendance list. The Stonki are not very bright, so some of them signed several times. Worse, they cannot write well: they mix up uppercase and lowercase letters, and they often insert the character - (a minus sign) anywhere.

Given the attendance list (one entry per line), count how many distinct names appear on it. The same name may appear many times. A real name consists only of uppercase English letters and has at most 20 characters. A Stonka may write its name by:

  • turning some of its uppercase letters into lowercase letters,
  • inserting any number of - characters at any positions.

For example, the entries A-b and --A-B- both stand for the same name AB.

Input

The first line contains the number of entries jj (1j100001 \le j \le 10000). Each of the next jj lines contains one entry from the list. An entry can be arbitrarily long, but it is guaranteed that at most 20 of its characters are different from -.

Output

Print a single line containing the number of distinct names on the list.