$n$ villagers wear either black or white hats. The truth is that all the hats are black, but this is not known. They sit in a line, so that each villager can see all the hats in front of them, but not the hats behind them. If a villager ever deduces the fact that all the villagers (including himself) know that their hats are black, then he leaves at noon on the next day (without anyone in front noticing).
One day, a light is installed where all villagers can see it. The light remains on as long as at least one villager in the line has a black hat.
Will anyone ever leave? If so, after how long?