What is {position held} of {Carl Gustaf Emil Mannerheim} that is {replaced by} is {Juho Kusti Paasikivi} ?
What role did Carl Gustaf Emil Mannerheim occupy until Juho Kusti Paasikivi took over?
What position did Carl Gustaf Emil Mannerheim have until he was replaced by Juho Kusti Paasikivi?
SELECT ?m WHERE { ?w property:position_held ?m . resource:Carl_Gustaf_Emil_Mannerheim property:position_held ?w . ?w property:replaced_by resource:Juho_Kusti_Paasikivi }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q152306> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P39> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> ?obj .
?statement <http://www.wikidata.org/entity/P1366> <http://wikidata.dbpedia.org/resource/Q202171>
} 

SELECT ?obj WHERE { wd:Q152306 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q202171 }