Question: What is the head of government of Ontario (the one that shares border with Michigan) and of Bermuda?
Choices:
Critics' Choice Movie Award for Best Animated Feature
Rajasthan
I.R.S. Records
Christopher Hampton
Chris Thomas King
Gary Goetzman
The Biggest Loser
Ed Helms
The Quiet American
premier
Answer: premier
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "head of government" . ?e_1 <office_held_by_head_of_government> ?e . ?e_1 <pred:name> "Ontario" . ?e_1 <shares_border_with> ?e_2 . ?e_2 <pred:name> "Michigan" .  ?e_3 <office_held_by_head_of_government> ?e . ?e_3 <pred:name> "Bermuda" .  }
Program:
function: Find
inputs: Michigan
function: Relate
dependencies: 0
inputs: shares border with
backward
function: Find
inputs: Ontario
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: office held by head of government
forward
function: FilterConcept
dependencies: 4
inputs: head of government
function: Find
inputs: Bermuda
function: Relate
dependencies: 6
inputs: office held by head of government
forward
function: FilterConcept
dependencies: 7
inputs: head of government
function: And
dependencies: 5
8
function: What
dependencies: 9