First, let's deduce the fixed positions.
Here are a few sample questions and answers to illustrate the type of analytical reasoning skills required:
Considering the possibilities, we can conclude that A is standing next to either B or D. If A is standing next to B, then the order could be ABCD... or AB... . But D and E must be together, so the only possibility is: