题目描述
Problem Description
In a certain country, an election was held. There are three candidates: a, b, and c.
You are given a string $S$ representing all the votes cast. $S$ consists of lowercase letters a, b, and c, where the $i$-th character of $S$ represents the candidate voted for by the $i$-th voter. Determine which candidate received the most votes.
It is guaranteed that exactly one candidate will receive the most votes.
Input Format
The input is given from the standard input in the following format:
$ S $
Output Format
Output the lowercase letter representing the candidate who received the most votes.
Sample Input and Output
Sample Input #1
abbc
Sample Output #1
b
Sample Input #2
cacca
Sample Output #2
c
Sample Input #3
b
Sample Output #3
b
Sample Input #4
babababacaca
Sample Output #4
a
Notes/Hints
Constraints
- $1\ \leq\ |S|\ \leq\ 1000$
- $ S $ is a string consisting of
a,b, andc - Exactly one candidate will receive the most votes
Sample Explanation 1
Candidates a received 1 vote, b received 2 votes, and c received 1 vote. The candidate with the most votes is b.
Sample Explanation 2
Candidate b did not receive any votes.
Sample Explanation 3
Only one person voted, and that person voted for b, so the candidate with the most votes is b.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分