What is {position held} of {Ferdinand Marcos} that is {replaced by} is {Corazon Aquino} ?
What position did Ferdinand Marcos hold when he was replaced by Corazon Aquino?
SELECT ?obj WHERE { wd:Q1463 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q1480 }
select distinct ?obj  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q1463> .
?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/Q1480>
} 

Give me the post name held by Ferdinand Marcos at the time of his replacement with Corazon Aquino?