 
 <prompt> How Emperor wey dey 1240 relate to Emperor wey dey 1175? Given di last question, write context wey get di answer. E fit be 1 - 20 sentences. Context: <response>: ```During di early High Middle Ages, Germany bin dey ruled by di Ottonian dynasty, wey dey struggle to control di powerful dukes wey dey rule over territorial duchies wey trace back to di Migration period. For 1024, dem come replace dem with di Salian dynasty, wey famously clash with di papacy under Emperor Henry IV (r. 1084–1105) sake of church appointments as part of di Investiture Controversy. Him successors still dey struggle against di papacy and di German nobility. A period of instability follow di death of Emperor Henry V (r. 1111–25), wey die without heirs, until Frederick I Barbarossa (r. 1155–90) come take di imperial throne. Even though him rule effectively, di basic problems still dey, and him successors still dey struggle reach di 13th century. Barbarossa grandson Frederick II (r. 1220–1250), wey also be heir to di throne of Sicily through him mother, clash many times with di papacy. Him court dey famous for di scholars wey dey am and dem dey often accuse am of heresy. Him and him successors face many difficulties, including di invasion of di Mongols into Europe for di mid-13th century. Mongols first scatter di Kievan Rus' principalities and then invade Eastern Europe for 1241, 1259, and 1287.``` 