What was the position held by Mahmud of Ghazn after replacing
Mohammad Ghaznavi ?
SELECT ?obj WHERE { wd:Q189271 p:P39 ?s . ?s ps:P39 ?obj . ?s pq:P1366 wd:Q32627 }
mahmud of ghazni: Q189271 mohammad ghaznavi: Q32627