defining maxNumberOfDiffentLetters