Question: What country does J. G. Ballard belongs to who was born in Shanghai, twinned administrative body of Karachi?
Choices: Norway
Czechoslovak Socialist Republic
Kingdom of Great Britain
Union of South Africa
Roman Republic
Lithuania
Canada
Weimar Republic
Saxe-Weimar-Eisenach
People's Republic of China
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "J. G. Ballard" . ?e_2 <pred:name> "Shanghai" . ?e_3 <twinned_administrative_body> ?e_2 . ?e_3 <pred:name> "Karachi" . ?e_1 <place_of_birth> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <place_of_birth> ; <pred:fact_t> ?e_2 ] <country> ?qpv .  }
Program:
function: Find
inputs: J. G. Ballard
function: Find
inputs: Karachi
function: Relate
dependencies: 1
inputs: twinned administrative body
forward
function: Find
inputs: Shanghai
function: And
dependencies: 2
3
function: QueryRelationQualifier
dependencies: 0
4
inputs: place of birth
country
Answer: People's Republic of China