class Solution {
public:
string destCity(vector>& paths) {
unordered_set S;
for (auto& t : paths)
S.insert(t[0]);
for (auto& t : paths)
if (!S.count(t[1])) return t[1];
return "";
}
};



