Question: What sovereign state has Pakistan–Somalia diplomatic relations with Somalia?
Choices: Switzerland
South Korea
Kiribati
Cambodia
Turkey
Pakistan
United Arab Emirates
Russian Soviet Federative Socialist Republic
Djibouti
Kenya
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "sovereign state" . ?e <diplomatic_relation> ?e_1 . ?e_1 <pred:name> "Somalia" .  [ <pred:fact_h> ?e ; <pred:fact_r> <diplomatic_relation> ; <pred:fact_t> ?e_1 ] <statement_is_subject_of> ?qpv . ?qpv <pred:value> "Pakistan–Somalia relations" .  }
Program:
function: Find
inputs: Somalia
function: Relate
dependencies: 0
inputs: diplomatic relation
backward
function: QFilterStr
dependencies: 1
inputs: statement is subject of
Pakistan–Somalia relations
function: FilterConcept
dependencies: 2
inputs: sovereign state
function: What
dependencies: 3
Answer: Pakistan