My teacher gave me a homework: -
You are given a string (of at most 100 characters) consisting of lowercase characters, terminated with a # symbol. The s