While he was doing his round with his parishioners on Saturday afternoon, the new pastor of a village stood in front of a closed door of a house. There was obviously someone at home, but although he repeatedly knocked on the door, no one answered. Without delay he finally took one of his cards out, wrote Revelation 3:20 on the back and shoved it under the door.

After Sunday mass, he found his name card in the collection basket. Under his own handwriting someone else had written Genesis 3:10.
Openbaring 3:20
Revelation 3:20.
Genesis 3:10
Genesis 3:10.

Assignment

The Bible is a compilation of several shorter books that were written independently and over different periods, and were joined later. Since the early years of the 13th century, all of these books were - except a few short ones - further divided into chapters, each about one page long. Since the mid-16th century, each chapter is further divided into verses of a few short lines or sentences long. Sometimes a long sentence was divided into verses - such as in Ephesians 4:1-3 - and sometimes multiple short sentences form a single verse - for example, in Genesis 1:2. The usual way to refer to a bible quote is with the name of the book, the number of the chapter and the number of the verse. So Genesis 3:5 is, for example, an excerpt from the book of Genesis, chapter 3, verse 5.

We give you a text file bible.txt1 that contains the full English text of the Bible the following format:
*** Genesis ***

1:1 In the beginning God created the heaven and the earth.

1:2 And the earth was without form, and void; and darkness was upon the face of
the deep. And the Spirit of God moved upon the face of the waters.

*** Exodus ***

1:1 Now these are the names of the children of Israel, which came into Egypt;
every man and his household came with Jacob.

1:2 Reuben, Simeon, Levi, and Judah,

This text consists of a sequence of fragments.Each fragment consists of one or more consecutive lines and the different fragments are separated from each other by at least one blank line. Fragments that indicate the start of a new book, begin and end with three asterisks surrounding the name of the book (with an extra space before and after the name). All other fragments represent successive Bible verses. A Bible verse always begins with $$h:v$$ and a space, where $$h \in \mathbb{N}_0$$ indicates the number of the chapter, and $$v \in \mathbb{N}_0$$ the number of a verse.

Write a function verses to which the name of a text file is to be passed. This text file should contain the text of the Bible, in the format described above. The function must return a dictionary that depicts all verses from the file on their corresponding text. The keys of this dictionary are strings with the format book chapter:verse, and are displayed on the text of the Bible verse with the verse number verse, from the chapter with the number chapter, from the book with the name book. The text of a verse is formed by putting all the lines from which it consists after each other, separated by a single space. Before combining the lines, any white space in the beginning and the end of the lines must first be removed.

Example

In the following example session we assume that the file bible.txt 2is in the current directory.

>>> index = verses('bible.txt')

>>> index['Revelation 3:20']
'Behold, I stand at the door, and knock: if any man hear my voice, and open the door, I will come in to him, and will sup with him, and he with me.'
>>> index['Genesis 3:10']
'And he said, I heard thy voice in the garden, and I was afraid, because I was naked; and I hid myself.'