• + 0 comments

    def checks(x): n = c = 0 y = list(x)

    for i in y:
        if i.isdigit():
            n += 1
        if i.isupper():
            c += 1
        if y.count(i) > 1:
            return False
    
    if n >= 3 and c >= 2:
        return True
    else:
        return False
    

    for _ in range(int(input())): s = input() if len(s) == 10 and s.isalnum() and checks(s): print("Valid") else: print("Invalid")