11 prisoners arrive at a jail.
But this jail is not an ordinary jail, it's a jail whose Warden despises ignorance and reveres wisdom. So much so, that the Warden is willing to free the group of prisoners if they can solve the puzzle the Warden gives them.
When the prisoners arrive, the Warden announces the puzzle.
"In my jail, there is a switch room and 11 solitary confinement cells. I've just cleaned them out so don't trash the place.
Anyway, after today, I will take you all and put you in your confinement cells, without any possible communication between any of you. During the your confinement, whenever I feel like it, I will randomly pick one of you and take you to the switch room.
The switch room has two switches - A and B. They are not connected to anything, but they can either be in an ON or OFF position. I will not tell you their current positions.
The person in the switch room has to reverse the position of one of the switches, and only can reverse the position of one of the switches. Then I will take that person out and put them in their confinement cell. I will not touch the switches, or mess with them in any way.
All this time, the switch room is not visible from the outside, and there will be no trickery like leaving messages or anything. If you try anything fishy, I'll land you in toilet duty for the next month.
I can pick one of you thrice in a row to go to the switch room, or jump around and come back. I, however, will still make it possible for you to finish the puzzle - just not telling you when.
Now, at any point in time, any of you can come up to me and claim that all of you have visited the switch room. If you are right, then you can all go free and cake will be served. If you are wrong, then all of you will have to clean out my bedroom for the rest of your term (it makes me shudder to even think about it).
I will give you the next 24 hours before I put you in solitary confinement to make a plan"
How can the prisoners guarantee an escape plan without risking a fate worse than death?