Question and Answer from L4-M1
t = int(input().strip())
tried_ingredients = set()
count = 0
for _ in range(t):
drink = input().strip()
# If no ingredient in this drink has been tried before
if all(ch not in tried_ingredients for ch in drink):
count += 1
tried_ingredients.update(drink)
print(count)