Hidden number

0

0 votes
Easy
Problem

A friend of yash Mittal challenged him to solve a problem . He found the problem very easy ( not of his level ) and thus has requested you to solve to save his precious time.

You are given a string S. You have to find the maximum number hidden in the given string. Size of string will be less than 18 characters if all of the string contains only alphabets : return -1

INPUT: First line contains the number of test cases t Following t lines contain a string s

OUTPUT: T lines containing the answer(The maximum number hidden)

CONSTRAINTS: T<=15 length of string <=15

Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?