Question: Which public office is the head of government of Rostov-on-Don and the head of government of Long Beach (the filming location of Chaplin)?
Choices: Governor of New York
Governor of New Jersey
Governor of Kentucky
professor
Robert De Niro
Vojvodina
Governor of Texas
mayor
Governor of Massachusetts
attorney general
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "public office" . ?e_1 <office_held_by_head_of_government> ?e . ?e_1 <pred:name> "Rostov-on-Don" .  ?e_2 <office_held_by_head_of_government> ?e . ?e_2 <pred:name> "Long Beach" . ?e_3 <filming_location> ?e_2 . ?e_3 <pred:name> "Chaplin" .  }
Program:
function: Find
inputs: Rostov-on-Don
function: Relate
dependencies: 0
inputs: office held by head of government
forward
function: FilterConcept
dependencies: 1
inputs: public office
function: Find
inputs: Chaplin
function: Relate
dependencies: 3
inputs: filming location
forward
function: Find
inputs: Long Beach
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: office held by head of government
forward
function: FilterConcept
dependencies: 7
inputs: public office
function: And
dependencies: 2
8
function: What
dependencies: 9
Answer: mayor