Concept:Arrange 8 persons in a line using relative positions.
Explanation:From "E sits second right to D": order is D _ E.
From "H sits fourth left to D": order is H _ _ _ D.
Combining gives possible positions: D at 5 (E at 7, H at 1) or D at 6 (E at 8, H at 2).
"Only two persons between A and E" forces A at 4 when E at 7, or A at 5 when E at 8.
Case D=5 fails because remaining spots force G next to E, violating "G is not neighbor of E".
Case D=6: positions: H=2, A=5, D=6, E=8. Remaining spots: 1,3,4,7.
C and F are immediate neighbors, so they occupy 3 and 4 (only adjacent pair left).
Then B and G occupy 1 and 7. G cannot neighbor E (at 8), so G=1, B=7.
C is not neighbor of A (at 5), so C must be at 3, F at 4.
Final arrangement: 1:G, 2:H, 3:C, 4:F, 5:A, 6:D, 7:B, 8:E.
Left end = G, right end = E.
Answer:G and E