Ravi has a dream to be a King. One of the rule in his kingdom will be that for a couple to name their kids they have to choose only from certain number of alphabets.
Ravi has a dream to be a King. One of the rules in his kingdom will be that for a couple to name their kids they have to choose only from a certain number of alphabets. So, if a couple chooses
c alphabets their children's names can be
cab, etc. These sets of alphabets are unique for every couple. You being a minister in Ravi's ministry has the task to find out the size of the largest family in the kingdom.
Ni.e. Number of children in kingdom.
Nspace separated strings denoting name of child.
Only lower case letters are used to form names
Single integer denoting size of largest family.
5 abc cab pqr xyz rst
cab belongs to the same family.