#K7011. Ticket Serial Validator
Ticket Serial Validator
Ticket Serial Validator
You are given a ticket serial number as a string. The serial number is valid if and only if it meets the following conditions:
- Its length is between 1 and 100 (inclusive).
- It contains exactly one upper-case English letter (i.e. one letter from (A) to (Z)).
- It contains at least one digit (i.e. one character from (0) to (9)).
- All characters in the serial are alphanumeric (letters and digits only).
If all the conditions are met, print VALID
; otherwise, print INVALID
.
Note: The input will be given via stdin
and the output should be written to stdout
.
inputFormat
The input consists of a single line containing a non-empty string representing the ticket serial number. The string may include letters and digits, and its length is at most 100.
outputFormat
Output a single line: VALID
if the serial number meets the required conditions; otherwise, output INVALID
.## sample
A1b2c3
VALID