what is the {end time} for {KGB} has {chairperson} as {Alexander Shelepin} ?
From when Alexander Shelepin was termiated from Chairperson of KGB?
When did Alexander Shelepin stop being chairperson for the KGB?
SELECT ?v WHERE { ?o property:end_time ?v . resource:KGB property:chairperson ?o . ?o property:chairperson resource:Alexander_Shelepin }
select distinct ?value  where {
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> <http://wikidata.dbpedia.org/resource/Q80919> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate> <http://www.wikidata.org/entity/P488> .
?statement <http://www.w3.org/1999/02/22-rdf-syntax-ns#object> <http://wikidata.dbpedia.org/resource/Q533890> .
?statement <http://www.wikidata.org/entity/P582> ?value. 
} 

SELECT ?value WHERE { wd:Q80919 p:P488 ?s . ?s ps:P488 wd:Q533890 . ?s pq:P582 ?value}