• + 0 comments
    import re
    for _ in range(int(input())):
        regex = re.compile(r"[_.]\d+[a-zA-Z]*_?$")
        print("VALID" if regex.match(input()) else "INVALID")