10 dwarves where hanging around and a big giant came, he said that tomorrow he will put them on a column, each of them facing forward. He will put them white and black hats, and ask from the last to the first which color is his hat, if one told it right, he live, if not he die. The dwarves had a night to make a plan, and they made a plan that 9 of the dwarves would 100% live, and the last one had 50-50. What was this plan? Some stuff to know: They can only say White or Black. They're all facing forward, so the last one can see all the 9 hats of his friends, and the 9th could see all the 8 hats, and so on.