Deepest path matching