B1 - Wonderful Coloring - 1
This is a simplified version of the problem B2. Perhaps you should read the problem B2 before you start solving B1.
Paul and Mary have a favorite string which consists of lowercase letters of the Latin alphabet. They want to paint it using pieces of chalk of two colors: red and green. Let's call a coloring of a string wonderful if the following conditions are met:
- each letter of the string is either painted in exactly one color (red or green) or isn't painted;
- each two letters which are painted in the same color are different;
- the number of letters painted in red is equal to the number of letters painted in green;
- the number of painted letters of this coloring is maximum among all colorings of the string which meet the first three conditions.
E.