Man 1 shouts first if Man 2 and Man 3 wears same colour hat but if they don't wear same colour hat then Man 2 shouts.