Question: What city is the administrative division of Quebec (the one that shares border with Newfoundland and Labrador)?
Choices: Santo Domingo
Kingston
Trieste
Abidjan
Mosul
Odense
Cork
Bergen
Laval
Perth
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "city" . ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Quebec" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "Newfoundland and Labrador" .   }
Program:
function: Find
inputs: Newfoundland and Labrador
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Quebec
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 4
inputs: city
function: What
dependencies: 5
Answer: Laval