what is the {replaces} for {Mohammad Mosaddegh} has {position held} as {Prime Minister of Iran} ?
As { Mohammad Mosaddegh },{ Prime Minister of Iran }, what are the { replacements }?
What are the { replacements } for { Mohammad Mosaddegh } as { Prime Minister of Iran }?
SELECT ?u WHERE { ?d property:replaces ?u . ?d property:position_held resource:Prime_Minister_of_Iran . resource:Mohammad_Mosaddegh property:position_held ?d }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q123037> .
?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> <http://wikidata.dbpedia.org/resource/Q13561063> .
?statement <http://www.wikidata.org/entity/P1365> ?value. 
} 

SELECT ?value WHERE { wd:Q123037 p:P39 ?s . ?s ps:P39 wd:Q13561063 . ?s pq:P1365 ?value}