Find The Most Frequent Digit

easy
1. You are given a number N. 2. You have to find the most occurring digit in N. 3. If two or more digits occur same number of times, then return the highest digit out of them. 4. The number is given input as a String. 5. main takes input from the users. 6. This is a functional problem. 7. You have to complete the solve function. It takes as input the String N representing a number. It should return the most occurring digit as an integer. 8. Don't change the code of main.

Input Format

First line takes input N. Input is handled for you.

Output Format

Most occurring digit. Output is handled for you.

Constraints

N/A

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
12324
Output
2
Previous
Find The Difference
Next
Find The Odd Occurrence

Related Questions