Once upon a time in old times there was a scholar name Jairam. He with his servenet were going to Nalanda, where Jairam was going to appear for his master’s degree examination. On their was came a twon now known as Ujjan and they planed to stay in this town for that night. Jairam happened to meet three other gentlemen, all graduates like himself in Ujjan. He was so charmed with their unusual refinement that he proposed to toast a dinner and requested the three genetelmen to join him in it. While thus pleasantly employed, his three new friends told him their names. One was Kakdiwal, the second, Nageshware and the other, Maidakram. They eat away and enjoyed themselves very much, until evening had crept upon them unperceived, when Nageshware said, “Here we, who ought to have been playing the host, have been feasting at a stranger’s expense. This is not right. But, come, my house is close by; I will provide you with a bed.” Kakdiwal and Maidakram got up, and taking Jairam by the arm, bade his servant come along with them.
When they reached a hill to the north of the town, there before them was a house and grounds, with a stream of clear water in front of the door, all the apartments within being beautifully clean and nice. Chieh then gave orders to light the lamps and see after his visitor’s servant; whereupon Maidakram observed, “Of old it was customary to set intellectual refreshments before one’s friends. Let us not miss the opportunity of this lovely evening, but decide on four themes, one for each of us; and then, when we have finished our essays, we can set to work on the entertainment stuff.” To this the others readily agreed; and each wrote down a theme and threw it on the table. These were next divided amongst them as they sat, and before the second watch was over the essays were all completed and handed round for general inspection; and Jairam was so struck with the elegance and vigor of those by his three friends, that he ran off a copy of them and put it in his pocket. The host then produced some excellent dance and magic for entertainment. Latter, the other two now took their leave; Jairam and his servent very so tiered by now that they went to bed in their boots and clothes.
The sun was high in the heavens when Jairam awaked, and looking round, he saw no house or grounds, only a dell on the hillside, in which he and his servant had been sleeping. In great alarm he called out to the servant, who also got up, and then they found a hole with a rill of water trickling down before it. Much astonished at all this, he felt in his pocket, and there, sure enough, was the paper on which he had copied the three essays of his friends. On descending the hill and making inquiries, he found that he had been to the Grotto of the Three Genii – Crab, Snake, and Frog, three wonderful beings, who often came out for a stroll, and were occasionally visible to mortal eyes.
Subsequently, when Jairam entered the examination hall in Nalanda, the three themes set were those of the Three Genii, and he came out at the top of the list.