Task: Question Understanding
Input (English): Passage: In early July, Verijsel received 360 Ambonese troops, led by Kraeng Tanate, to aid him in the defence of Semarang. On 21 July, Captain Gerrit Mom arrived from Sulawesi with 800 troops to serve as further reinforcements. Mom and Tanate were then sent to recapture Demak, occupied by 4,000 rebels under the command of the Chinese general Singseh and Javanese general Raden Suryakusuma. The ensuing battle took place over several days and resulted in a Dutch victory. The Dutch troops continued on to Kudus, where an estimated 2,000 Chinese soldiers were awaiting arrivals from Kartosuro. With their numbers reinforced by further troops led by Ngabehi Secanegara from Jepara and Captain Hendrik Brule from Semarang, Mom and Tanate recaptured the city without a fight on 28 August. After the recapture of Demak and Kudus, the remaining regents began to surrender, promised pardon by Pakubuwono II. The Chinese and Javanese rebel coalition, which was beginning to unravel, continued to hold Kartosuro until December 1742, being only chased out of the city when Cakraningrat IV came and retook it. Although the Javanese were allowed to escape unmolested, the Chinese were only able to escape to nearby Prambanan after a "pitched battle" in Asem. Two months later the Chinese, accompanied by noted Javanese leader Pakunegara, made a last stand but were defeated and forced to run to the foothills along the southern coast. A general amnesty was soon declared, and Singseh surrendered in Surabaya.
Question: Where did the Dutch capture first, Demak or Kudus?
Output (English): span