Aditya is a professor in Engilsh loves to play with words. Today he asks his assistant Abishek to perform an experiment where he wants him to calculate the total number of word that can be formed from a given word such that the characters are arranged lexicographically(in alphabetical order). The words that are to be formed can start with any of the alphabets present in the word and the generated word cannot contain a single alphabet twice given by the professor. 

Abishek visit you as their professor for Computer Science to help them by writing a code that would calculate the same.

INPUT:

First line contains the no of test cases, N<1000
Next N lines contains Strings of length L<1000000

OUTPUT:

N Lines containing the no of words formed in each test case

SAMPLE INPUT
3
ankit
aman
cvrcebhubaneswar

SAMPLE OUTPUT
5
3
11

Explanation

For  1st String ankit

The words Formed are:

aiknt
iknt
knt
nt
t

For aman

amn
mn
n
import collections
a=[]
t=int(raw_input())
for q in range(0,t):
	s=raw_input()
	letters = collections.Counter(s)
	print(len(letters.values()))