Because Asamañjasa engaged in such abominable activities, his father gave up affection for him and had him exiled. Then Asamañjasa exhibited his mystic power by reviving the boys and showing them to the King and their parents. After this, Asamañjasa left Ayodhyā.
Srimad Bhagavata Purana
श्रीमद्भागवतमहापुराणम्
मूल श्लोकः
आचरन् गर्हितं लोके ज्ञातीनां कर्म विप्रियम् । सरय्वां क्रीडतो बालान् प्रास्यदुद्वेजयन् जनम्
ācaran garhitaṃ loke jñātīnāṃ karma vipriyam | sarayvāṃ krīḍato bālān prāsyadudvejayan janam
SB 9.8.17