what is the {country} for {May} has {named after} as {Magtymguly Pyragy} ?
the country name that was named after Magtymguly pyragy is?
What country for May was named after Magtymguly Pyragy?
SELECT ?c WHERE { ?b property:named_after resource:Magtymguly_Pyragy . resource:May property:named_after ?b . ?b property:country ?c }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q119> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P138> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q2355095> .
?statement <http://www.wikidata.org/entity/P17> ?value. 
} 

SELECT ?value WHERE { wd:Q119 p:P138 ?s . ?s ps:P138 wd:Q2355095 . ?s pq:P17 ?value}