Who did Nelson Mandela replace as the President of South Africa?
SELECT ?value WHERE { wd:Q8023 p:P39 ?s . ?s ps:P39 wd:Q273884 . ?s pq:P1366 ?value}
nelson mandela: Q8023 president of south africa: Q273884