Definition: In this task, you will be presented with a text and a pronoun. You should write the name that the pronoun refers to. Position of the pronoun in the text is showed within two "_"s.
Input: In April 1536 he joined the league of Schmalkalden, though he did not assent to some of the schemes of Philip of Hesse for attacking Charles V. In 1546 his troops fought against the emperor during the war of the league of Schmalkalden, but with disastrous results for W*rttemberg. The duchy was quickly overrun, and the duke compelled to agree to the treaty of Heilbronn in January 1547. By this treaty Charles, ignoring the desire of Ferdinand to depose Ulrich again, allowed _him_ to retain his duchy, but stipulated that he should pay a large sum of money, surrender certain fortresses, and appear as a suppliant before the emperor at Ulm. <sep>, Pronoun: him

Ferdinand