Shortest way in a maze