You are given a list of words, each consisting only of lowercase Latin letters. Your task is to determine how many distinct groups of anagrams are present in the list.
An anagram is a word formed by rearranging the letters of another word, using all the original letters exactly once. For example, the words "listen", "silent", and "enlist" are anagrams and belong to the same group.
A group contains all words that are anagrams of each other.
Input file contains multiple lines, each containing one word, consisting only of lowercase Latin letters. The length of each word does not exceed . The number of words (lines) does not exceed 10^5.
Print a single integer — the number of distinct anagram groups in the list.
Example 1