mystory = """{0} and {1} went up the hill
To fetch a pail of water.
Jack fell down and broke his crown,
And Jill came {4} after.

Up Jack got, and home did trot,
As fast as he could caper,
He went to {2} to mend his head,
With vinegar and {4} paper."""

noun1=raw_input('Enter a noun')
noun2=raw_input('Enter a noun')
noun3=raw_input('Enter a noun')
verb1=raw_input('Enter a verb')
adjective1=raw_input('Enter an adjective')

print mystory.format(noun1,noun2,noun3,verb1,adjective1)