Question: What is the connection between Franklin County (the one that shares border with Berkshire County) to Hampshire County (the one that shares border with Hampden County)?
Choices: copyright holder
country
heritage designation
participant
shares border with
risk factor
filming location
Wikidata property
native language
narrator
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Franklin County" . ?e_3 <shares_border_with> ?e_1 . ?e_3 <pred:name> "Berkshire County" . ?e_2 <pred:name> "Hampshire County" . ?e_4 <shares_border_with> ?e_2 . ?e_4 <pred:name> "Hampden County" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Berkshire County
function: Relate
dependencies: 0
inputs: shares border with
forward
function: Find
inputs: Franklin County
function: And
dependencies: 1
2
function: Find
inputs: Hampden County
function: Relate
dependencies: 4
inputs: shares border with
forward
function: Find
inputs: Hampshire County
function: And
dependencies: 5
6
function: QueryRelation
dependencies: 3
7
Answer: shares border with