Utopian Identification Number

  • + 0 comments
    import re
    
    regex = re.compile(r'^[a-z]{0,3}[0-9]{2,8}[A-Z]{3,}$')
    
    
    for i in range(int(input())):
        if regex.match(input()):
            print('VALID')
        else:
            print('INVALID')