This is a beginner question I just got today. Could anyone give me an idea how to solve this?

Three people stand in line, one after the other. A hat is placed on the head of each one of them from a set of three white and two black hats. Each person can see only the hats of the persons standing around them, and not his own. They all know there are three white hats and three black hats. Show at some point in time that one of them knows the color of his own hat.

thanks in advance.