Zhene, Lev, and Grisha were seated in such a way that Zhene could see Lev and Grisha, Lev could see only Grisha, and Grisha could see no one. Then, from a bag containing two white and three black hats (the contents of the bag were known to the boys), a hat of unknown color was taken out and placed on each of them, with two hats remaining in the bag. Zhene said that he could not determine the color of his hat. Lev, having heard Zhene's answer, said that he also lacked the information to determine the color of his hat. Could Grisha determine the color of his hat based on these answers?
Under what condition can Zhenya determine the color of his hat?

## Solution

Zhenya will be able to determine the color of his hat only if both Lёva and Grisha are wearing white hats. Since he did not name the color of his hat, it means that both Lёva and Grisha are either wearing black hats or one is wearing a white hat and the other a black hat. If Grisha were wearing a white hat, then Lёva, upon hearing Zhenya's response, could have confidently said that he was wearing a black hat. Since he did not say this, Grisha can be sure that he is wearing a black hat.

## Answer

Yes. Zhenya cannot determine the color of his hat, which means that Lёva and Grisha are either wearing two black hats or one black and one white. If Grisha were wearing a white hat, Lёva would have determined that he was wearing a black hat. Therefore, Grisha is wearing a black hat.