You will be given a definition of a task first, then some input of the task.
Answer the question from the given passage. Your answer should be directly extracted from the passage, and it should be a single entity, name, or number, not a sentence.

Passage: The most frequent musical contributor during the first 15 years was Dudley Simpson, who is also well known for his theme and incidental music for Blake's 7, and for his haunting theme music and score for the original 1970s version of The Tomorrow People. Simpson's first Doctor Who score was Planet of Giants (1964) and he went on to write music for many adventures of the 1960s and 1970s, including most of the stories of the Jon Pertwee/Tom Baker periods, ending with The Horns of Nimon (1979). He also made a cameo appearance in The Talons of Weng-Chiang (as a Music hall conductor). Question: What was the last Doctor Who episode that Dudley Simpson wrote music for?
Output:
The Horns of Nimon