A group of elementary students ages 9 through 11, on their way to school in western Pennsylvania, received an unwanted lesson in the male anatomy as a man wearing not a stitch of clothes got their attention and then drew attention to his full state of undress.

As KDKA-TV in Pittsburgh reports, it happened in the Highlands School District in Allegheny County as the students made their way to Grandview Elementary Wednesday morning.

That's when the students heard knocking and pounding coming from the nearby Keystone Apartments, KDKA writes, adding:

When they looked up, they saw a male standing in a window. He was completely naked and trying to draw attention to himself.

TribLive.com reports when officers arrived and investigated, the found Gregory Costanzo, 54, of Tarentum, Pa., sleeping naked in his apartment, with a chair by the window where he allegedly stood to get the students' attention.

Police arrested Costanzo, who allegedly told officers that he did it because "little girls turn him on," KDKA writes.

Pa. teacher collapses in class and dies - more Pa. Buzz

Costanzo also provided police with a written confession, TribLive.com reports.

He faces charges of indecent exposure, open lewdness and disorderly conduct.

At last report, he was lodged at Allegheny County Jail in lieu of $20,000 bail.