Answer:
1. Only the first two people’s hats are: one white and one black or all black. The third person does not know what he is wearing.
2. The hats of the first two people are: one white and one black. If the first one is white, the second person will know that he is black.
3. The last two people do not know No matter what hat you wear, the first person will know that you have a black hat.