import re
def wordcount(text):
words = re.sub(r'[^a-zA-Z\s]', '', text.lower()).split()
word_count = {}
for word in words:
if word in word_count:
word_count[word] += 1
else:
word_count[word] = 1
return word_count
input_text = """Hello world!
This is an example.
Word count is fun.
Is it fun to count words?
Yes, it is fun!"""
output = wordcount(input_text)
print(output)