#A. Frequency

    传统题 1000ms 256MiB

Frequency

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Statement

You are given a string S consisting of lowercase English letters. Find the character that appears most frequently in S . If multiple such characters exist, report the one that comes earliest in alphabetical order.

Constraints

  • 1≤∣ S ∣≤1000 (∣ S ∣ is the length of the string S .)
  • Each character in S is a lowercase English letter.

Input

The input is given from Standard Input in the following format:

S

Output

Among the characters that appear most frequently in S, print the one that comes earliest in alphabetical order.


Sample Input 1

frequency

Sample Output 1**

e

In frequency, the letter e appears twice, which is more than any other character, so you should print e.

Sample Input 2


pseudopseudohypoparathyroidism

Sample Output 2

o

Limitation

1s, 1024KiB for each test case.

睿抗报销选拔赛

未参加
状态
已结束
规则
IOI
题目
5
开始于
2024-4-29 20:30
结束于
2024-4-29 22:30
持续时间
2 小时
主持人
参赛人数
40