Writer sentenced to three years imprisonment