Utopian Identification Number

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