Question: What { replaced } for { Livorno } has { head of government } like { Nicola Badaloni }?
Paraphrase: Who replaced Nicola Badaloni as the Livorno head of state?
SPARQL (Wikidata): SELECT ?value WHERE { wd:Q6761 p:P6 ?s . ?s ps:P6 wd:Q3876122 . ?s pq:P1366 ?value}