The court also directed the accused to do community service in the Ram Sringari Kenya High School and JM High School, both in Kamtaul here for eight and seven days, respectively.
"Accused persons are directed to report at the school when it starts. The principal of the said school will ensure and send a report in this regard to the court," the court order issued on Monday read.
The accused have been identified as Hashmat Khan, Md Akbar and Md Afzal.
The four accused had, on November 11, allegedly taken the girl to an orchard near Kamtaul with an intention to molest her. However, friends of the victim raised alarm and some villagers drove them away.
A case was registered against them under several Sections of Indian Penal Code (IPC) and Protection of Children from Sexual Offences (POCSO) Act.