Question: Which country has the diplomatic relationship maintained with German Democratic Republic?
Paraphrase: What country has the diplomatic relationship maintained with German Democratic Republic?
SPARQL (Wikidata):  select distinct ?obj where { wd:Q16957 wdt:P530 ?obj . ?obj wdt:P31 wd:Q3024240 } 
Answer: Soviet Union, Yugoslavia