Define the value of a string as the number of occurrences of the character with the most occurrences minus the number of occurrences of the character with the least occurrences in the string.
Now give you a string , ask what is the maximum value of all nonempty substrings of
(a substring is a contiguous sequence of characters within a string).
A line contains a stringcontaining only lowercase letters. (
).
Output an integer on a line, indicating the answer.