for test in range(int(input())):
    s = input()
    print(len(list(set(s))))

a9e2383f7e2a435a177bc299495f2ad72c71be62
<mask token>

for test in range(int(input())):
    s = input()
    print(len(list(set(s))))
