Four prisoners, A, B, C and D, are lined up. There is a wall between C and D. - A goes to B and C.
- B sees C.
- C and D don't see anyone on the other side of the wall. Four hats are distributed, two black and two white, one for each prisoner. Everyone knows that information. In order, they are asked if they can deduce the color of his hat. After a moment, one of them answers yes. Who can know and how do you deduce it?