query: SELECT ?item ?country ?countrylabel ?cat2
  {
   	?item wdt:P971 wd:Q220505 . 
  	?item wdt:P971 ?country .
  	?country wdt:P31 wd:Q6256 .
  	BIND( CONCAT("{{#invoke:AutoListLinks \u007C statementtocat \u007C cat=", strafter(str(?item),"y/") ," \u007C property=P17 \u007C value=", strafter(str(?country),"y/") ," \u007C depth=1 \u007C desc=0}}") as ?cat2 )
  	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . ?country rdfs:label ?countrylabel }
  }
  ORDER BY ?countrylabel