Task: Question Generation
Input (English): Passage: By late August 1921, Spain lost all the territories it had gained since 1909. Spanish troops were pushed back to Melilla, which was their biggest base in the eastern Rif. Spain still had 14,000 soldiers in Melilla. However, Abd el-Krim ordered his forces not to attack the town. He subsequently told the writer J. Roger-Matthieu that since citizens of other European nations were residing in Melilla, it was feared they would intervene in the war should their citizens come to harm. Other reasons included the dispersal of Rifian fighters from several loosely allied tribes following the victory at Annual; and the arrival in Melilla of substantial reinforcements from the Legion and other Spanish units recalled from operations in western Morocco. By the end of August Spanish forces at Melilla numbered 36,000 under General Jose Sanjurjo and the slow process of recovering the lost territory could begin. Thus the Spanish could keep their biggest base in the eastern Rif. Later Abd el-Krim would admit: "I bitterly regret this order. It was my biggest mistake. All the following tenor of events happened because of this mistake." By January 1922 the Spanish had retaken their major fort at Monte Arruit  and had reoccupied the coastal plain as far as Tistutin and Batel. The Rifian forces had consolidated their hold of the inland mountains and stalemate was reached. The Spanish military suffered losses even at sea; in March the transport ship Juan de Joanes was sunk in Alhucemas Bay by Riffian coastal batteries, and in August 1923, while shelling Riffian positions, the battleship España ran aground off Cape Tres Forcas and was eventually scrapped in situ. In a bid to break the stalemate, the Spanish military turned to the use of chemical weapons against the Riffians.
Output (English): How many years did it take Spain in August 1921 to have lost all the territories it had gained since 1909?