Suneo invites Nobita to his birthday party. In order to humiliate Nobita, he has planned a game in which Nobita has no chance of winning.
Nobita has to play the game to avoid Gian's beating.
The rule of the game is:
The player will be given a list of words and the player has to compute the largest set of matching words.
Two words are said to matching if they have the same letters and their frequency is same.
For example, "burned" and "burden" are matching words as they have same letters {b,d,e,n,r,u} and the frequency of each letter in both the words is same.
Can you save Nobita!!
INPUT
The first line of the input contains an integer N, denoting the number of words to be given to the player.
The next N lines will contain the words.
OUTPUT
Output a single integer representing the size of the largest set of matching words.
CONSTRAINTS
1 <= N <= 5000
1 <= Length of a word <= 1000
The words contains only the lower case letters of english alphabet.
"won", "own" and "now" forms the largest set of matching words.