Four prisoners named P1, P2, P3 and P4 are arrested for a crime, but the jail is full and the jailer has nowhere to put them. He eventually comes up with the solution of giving them a puzzle and if they answer correctly they can go free but if they fail they are to be executed. The jailer makes prisoners P1, P2 and P3 stand in a single file. Prisoner P4 is put behind a screen. The arrangement looks like this: P1 P2 P3