Question: Which administrative territorial entity borders both Teton and Park counties?
Choices:
Fremont County
Greene County
Park County
Washoe County
Delaware County
Cass County
Lee County
African Union
Teton County
Kent County
Answer: Fremont County
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "administrative territorial entity" . ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Teton County" .  ?e_2 <shares_border_with> ?e . ?e_2 <pred:name> "Park County" .  }
Program:
function: Find
inputs: Teton County
function: Relate
dependencies: 0
inputs: shares border with
backward
function: FilterConcept
dependencies: 1
inputs: administrative territorial entity
function: Find
inputs: Park County
function: Relate
dependencies: 3
inputs: shares border with
forward
function: FilterConcept
dependencies: 4
inputs: administrative territorial entity
function: And
dependencies: 2
5
function: What
dependencies: 6