In a galaxy far far away, a planet different from ours, computer usernames follow a different format.
Your task is to validate whether a username is valid or not
- It has to begin with either an underscore '_' (ascii value 95) or a dot '.' (ascii value 46)
- It has to be immediately followed by one or more occurrences of digits numbered 0-9
- It can then have letters, both uppercase or lowercase, 0 or more in number
- It can then end with an optional '_' (ascii value 95)
Your task is to validate whether a username is valid or not
Input Format
First line contains N, N usernames follow each in a newline.
Sample Input
3
_0898989811abced_
_abce
_09090909abcD0
Output Format For every username, print "VALID" or "INVALID" based on the descsribed rules.
Sample Output
VALID
INVALID
INVALID
You must be logged in to submit a solution.