BETA

Difficulty Level: Easy

Submissions: 2991 Accuracy:

41.32%

Extract Maximum
       

You have been given an alphanumeric string , extract maximum numeric value from that string. Alphabets will only be in lower case.

Input:
The first line contains a single integer T i.e. the number of test cases. The first and only line consists of a String S.

Output: 
In one line print the Maximum number extracted from the string S.

Constraints:
1<=T<=100
2<=N<=100

Example:
Input:

3
100klh564abc365bg
abvhd9sdnkjdfs
abchsd0sdhs


Output:
564
9
0

Explanation:
Test Case 1:
The maximum number found in the string is "564".  

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Ashtputre

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.