Masters of Logic Puzzles I. (dots)- Back to the Logic Puzzles

Three masters of logic wanted to find out who was the wisest one. So they invited the grand master, who took them into a dark room and said: "I will paint each one of you a red or a blue dot on your forehead. When you walk out and you see at least one red point, raise your hands. The one who says what colour is the dot on his own forehead first, wins." Then he painted only red dots on every one. When they went out everybody had their hands up and after a while one of them said: "I have a red dot on my head."

How could he be so sure?Spoiler for Solution

makes sense when u think about it