The Devil himself comes to Earth to open his own church and the world becomes a pandemonium of delights and confusions. Based on a short story by Machado de Assis, the most famous realistic Brazilian writer of the XIX century.
Detective Lieutenant Boruvka (Lubomír Lipský) is called to the State Scientific Library to investigate the loss of a precious manuscript, the Infernal Psalter of the Occult Sciences by Master Peregrinus from the eleventh century, written in a secret script which has only recently been deciphered by senior lecturer Zajíc (Josef Chvalina). Chaos is reigning in the labyrinth of passages and halls of the former monastery where the library is housed. In order to save space the director of the library has introduced a peculiar system. The books are arranged in the bookcases according to height and six girls dressed in black, the library assistants, are quite happy to cut volumes down to size in case of need. Boruvka refuses the case, since he is specialist in murders. He has to return to the investigation, however, when senior lecturer Zajíc disappears.
Ichabod Crane becomes the headmaster at a schoolhouse. He falls for Katrina Van Tassel but she has a lover: Brom Bones. Brom scares him off acting as the Headless Horseman only to meet the real one himself.
Smart Man Nassredin easily penetrates into Bukhara Emir inner circle posing as Wise Man from Damascus. He becomes Emir trusted advisor, and even convinces the tyrant to relax the rule and release a lot of political prisoners (because stars favor this arrangement).