Being Imprisoned: Punishment, Adaptation and Desistance