A Newburgh man assaulted a pensioner and exposed himself to two women, one in her 70s.
Stuart Clark, 27, was jailed for eight months for the offences, which happened in Buckhaven in May.
He repeatedly punched a man in his 70s in the face and made sexual comments to the women.
Clark admitted the offences when he appeared at Kirkcaldy Sheriff Court.
Solicitor Joe Mooney said Clark had mental health difficulties and his personality was distorted by alcohol but he had had time to reflect on his behaviour.
Sheriff Alison McKay noted Clark had breached community orders and said: “There’s no alternative to a custodial sentence on these charges.”