The Prisoner Problem-a Generalization