prison logic