• + 0 comments

    test_cases = int(input()) for i in range(test_cases): string = input() upper_count=0 digits_count=0 for ele in string: if ele.isupper(): upper_count += 1 elif ele.isdigit(): digits_count += 1
    unique_count = len(string)==len(set(string)) if len(string)==10 and unique_count and string.isalnum() and upper_count >=2 and digits_count >= 3: print('Valid') else: print('Invalid')