There were 4 people sitting in a row, trying to win $50 from a riddle.
The one in front was wearing a red hat.
The second from the front was wearing a blue hat.
The third from the front was wearing a red hat.
The last was wearing a blue hat and is blind-folded.
Each of them were informed that they are all wearing a hat, the last person is blind-folded and that there are 2 red and 2 blue hats. if they can guess the color of their hat, then they win the prize.
There was a long silence, then one of them guessed the color of his hat correctly. Who was it?
(Please note that they can only see the person in front of them and are not allowed to turn around and see behind them.)