Find the shortest path using strings