what is the {replaces} for {Mauricio Macri} has {position held} as {Head of Government of the Autonomous City of Buenos Aires} ?
Who took over the Head of Government of theA utonomous City of Buenos Aires after Mauricio Macro?
Who replaced Mauricio Macro as Head of Government of the Autonomous City of Buenos Aires?
SELECT ?b WHERE { ?q property:position_held resource:Head_of_Government_of_the_Autonomous_City_of_Buenos_Aires . ?q property:replaces ?b . resource:Mauricio_Macri property:position_held ?q }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q561837> .
?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/Q21693118> .
?statement <http://www.wikidata.org/entity/P1365> ?value. 
} 

SELECT ?value WHERE { wd:Q561837 p:P39 ?s . ?s ps:P39 wd:Q21693118 . ?s pq:P1365 ?value}