~/algor $ cat problems/string-anagramma-guruhlari
Anagram groups
Medium
1000 ms
128 MB
48%
$n$ words are given, each made of lowercase Latin letters. Words that are anagrams of each other (made of the same letters, possibly in a different order) belong to one group. Find the number of groups.
Input
The first line contains a positive integer $n$. Each of the next $n$ lines contains one word.
Output
One integer.
Note
$1 \le n \le 10^{4}$
Every word consists of $1$ to $10$ lowercase Latin letters
Examples
Input #1
6 listen silent enlist google elgoog abc
Output #1
3
Input #2
3 a b a
Output #2
2