Problem

7 /9


Largest line

Problem

Given a string containing only decimal digits. Write a program that uses recursion to find the largest digit.
When solving this problem, it is forbidden to use cycles and the word max.
 
Input
A string of non-zero length is entered. It is also known that the length of the string does not exceed 1000 characters and the string contains only decimal digits.
 
Output
Print the maximum digit that occurs in the input string.
 
Examples
# Input Output
1 11111111 1