the Smart Beaver ABBYY long history cooperate Institute Cytology Genetics Recently Institute staff challenge Beaver new problem the problem followsthere collection n protein necessarily distinct each protein string consist lowercase latin letter the problem scientist offer Beaver select subcollection size k initial collection protein representativity select subset protein maximum possibleThe Smart Beaver ABBYY research come conclusion representativity collection protein evaluate single number simply calculate Lets suppose collection a1ak consist k string describe protein the representativity collection follow value fxy length long common prefix string x y example fabc abd2 fab bcd0Thus representativity collection protein abc abd abe equal 6 representativity collection aaa ba ba equal 2having discover Smart Beaver ABBYY ask Cup contestant write program select give collection protein subcollection size k large possible value representativity help solve problem