You have 5 hats, 3 black hats 2 white hats, also you have 3 people and 3 chairs. Each one of the 3 is sitting on a chair and sees the others in front of him (The 3 are aligned). Then each of the 3 is given a random hat.
The last on was asked about his hat color, he answered 'I don't know'. The second (the middle one) was asked the same question, he answered 'I don't know'. Though, when the first one was asked , he answered 'Yes, i know' .. What was the color of his hat ?