• + 0 comments

    k=int(input())
    for _ in range(k):
        i=input()
        s=set(i)
        u=[j for j in i if j.isupper()]
        d=[j for j in i if j.isdigit()]
        if len(i)==10 and len(s)==10 and i.isalnum() and len(u)>1 and len(d)>2:
            print("Valid")
        else:
            print("Invalid")