str = input()[1:-1].split(", ")
if(str == ['']):
    print('0')
else:
    print(len(set(str)))
# print(str)
fdcf3f502e5695cc0c7dd1020ced4ff80819e964
<mask token>

<mask token>
if str == ['']:
    print('0')
else:
    print(len(set(str)))

str = input()[1:-1].split(', ')
if str == ['']:
    print('0')
else:
    print(len(set(str)))

str = input()[1:-1].split(", ")
if(str == ['']):
    print('0')
else:
    print(len(set(str)))
# print(str)