- 전에 시도했다가 틀렸던 문제여서 다시 풀어보기 위해 도전했다.
- 첫 번째 단어에서 한 문자를 더하거나, 빼거나 하나의 문자를 다른 문자로 바꾸어 나머지 입력받은 단어와 구성을 같게 하는 경우 비슷한 단어라고 한다.
import sys
input = sys.stdin.readline
T = int(input())
first_word = list(input().strip())
result = 0
for i in range(T-1):
copy_word = first_word[:]
input_word = list(input().strip())
cnt = 0
for j in input_word:
if j in copy_word:
copy_word.remove(j)
else:
cnt += 1
if cnt < 2 and len(copy_word) <= 1:
result += 1
print(result)