How can the characters find an alternative path?

Hello, as seen in the picture, the characters stand behind each other while going to the target, and the characters behind them cannot reach the target. The characters that cannot reach the target must go around the object and reach the target, as I marked, so how can the characters find an alternative way?