A man has been jailed once again for masturbating in front of women on trains just 12 days after his prison release.