What is {position held} of {Giulio Andreotti} that is {replaced by} is {Francesco Cossiga} ?
Francesco Cossiga is replacing Giulio Andreotti in what position?
What is the position held by Giulio Andreotti who is replaced by Francesco Cossiga?
SELECT ?p WHERE { resource:Giulio_Andreotti property:position_held ?c . ?c property:replaced_by resource:Francesco_Cossiga . ?c property:position_held ?p }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q50005> .
?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/Q1230>
} 

SELECT ?obj WHERE { wd:Q50005 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q1230 }