#C13960. Most Frequent Characters

    ID: 43556 Type: Default 1000ms 256MiB

Most Frequent Characters

Most Frequent Characters

You are given a string s consisting of lowercase English letters. Your task is to determine the character or characters that occur most frequently in the string. If there is more than one character with the same maximum frequency, output all of them sorted in alphabetical order.

Let \( f(c) \) denote the frequency of character \( c \) in the string. You should find all characters satisfying \[ f(c)= \max_{1\leq i \leq |s|} f(s_i), \] and print them in increasing order separated by a space. If the input string is empty, output nothing.

inputFormat

The input consists of a single line that contains a non-empty string s composed only of lowercase English letters.

outputFormat

Output the most frequent character(s) in alphabetical order separated by a single space. There should be no extra spaces at the beginning or end of the output.

## sample
banana
a