class Solution {
public String destCity(List<List<String>> paths) {
Set<String> setA = new HashSet<>(paths.size());
for(List<String> p : paths){
setA.add(p.get(0));
}
for(List<String> p: paths){
if(!setA.contains(p.get(1))){
return p.get(1);
}
}
return "";
}
}