What territorial entity of the German Confederation ended in 1866?
SELECT ?obj WHERE { wd:Q151624 p:P150 ?s . ?s ps:P150 ?obj . ?s pq:P582 ?x filter(contains(YEAR(?x),'1866')) }
german confederation: Q151624