#K6196. ID Validation: Check for Uppercase and Digit

    ID: 31425 Type: Default 1000ms 256MiB

ID Validation: Check for Uppercase and Digit

ID Validation: Check for Uppercase and Digit

You are given a list of identifiers, and your task is to validate each identifier. An identifier is considered valid if and only if it contains at least one uppercase English letter and at least one digit. Specifically, an identifier S is valid if it satisfies:

[ \exists c \in S, \text{where } c \in {A, B, \dots, Z} \quad \text{and} \quad \exists d \in S, \text{where } d \in {0, 1, \dots, 9} ]

Your program should read input from standard input (stdin) and output the result to standard output (stdout). For each identifier, print "Valid" if it meets the criteria; otherwise, print "Invalid". Each result should be output on a separate line.

inputFormat

The first line of the input contains a single integer n, the number of identifiers. The following n lines each contain one identifier as a non-empty string.

outputFormat

For each identifier provided in the input, output a single line containing either "Valid" or "Invalid" according to whether the identifier meets the validation criteria.

## sample
3
A1
abc
XYZ123
Valid

Invalid Valid

</p>