Suppose the story template is "Mary has a <1>. On the <1> was a <3> <2>. Mary <4> the <2> daily.
The newly created Mad Lib might be:

Mary has a table. On the table was a silly book. Mary studied the book daily.

Create the logic for a Mad Lib program that creates a story template, that accepts five words from input, then creates and displays a short story or nursery rhyme that from the five words the template.