prefix mon: SELECT ?C1 ?C2 FROM WHERE { ?C1 a mon:Country . ?C2 a mon:Country FILTER NOT EXISTS { ?C1 mon:neighbor ?C2 } }