You aren't allowed to say words other than black or white or signal in any other way (volume, intonation, etc.). At least NINE of you have to guess your hat colors correctly in order to survive. You have 5 minutes to discuss a solution with the others.
So breaking this down
10 people total, 9 must be correct
they are allowed to speak with ought limits the words "black" or "white"
solution: the tallest person can say "white" or "black" to each of the others when they must answer.
since the only rule was "you may only say white or black" no rules for saying you could not speak or even provide multiple answers.
IE you can always select a,b,c,d on a multiple choice, its a possibility but pretty much always wrong.
so by being wrong the 10th person ensures the other 9 are right and they pass the test, then the "intelligent" aliens feel stupid for allowing such a loophole