#C1509. Make String Unique

    ID: 44722 Type: Default 1000ms 256MiB

Make String Unique

Make String Unique

Given a string s, remove duplicate characters to create a modified string that contains only the first occurrence of each character. Determine the number of deletions required to achieve this. The order of characters must be preserved from their first occurrence in s.

Input Format: A single line containing the string s.

Output Format: Print the modified string followed by the number of deletions separated by a space.

Example:

Input:  aaabbb
Output: ab 4

inputFormat

The input is read from standard input (stdin) and consists of a single line containing the string s.

outputFormat

Output the modified string (which retains only the first occurrence of each character) and the number of deletions performed, separated by a space, to standard output (stdout).

## sample
aaabbb
ab 4