n = int(input())
count = 0
for i in range(n):
word = input().strip()
seen = set()
ans = ''
grop = 1
for ch in word:
if ch != ans:
if ch in seen:
grop = 0
seen.add(ch)
ans = ch
if grop == 1:
count += 1
print(count)
To embed this project on your website, copy the following code and paste it into your website's HTML: