code: def solve(m,c):
      
      G={ (m,c,1):[] }
      frontier=[ (m,c,1) ]  # 1 as boat starts on left bank 
      while len(frontier) > 0:
          hold=list(frontier)
          for node in hold:
              newnode=[]
              frontier.remove(node)
              newnode.extend(pick_next_boat_trip(node, m,c, frontier))
              for neighbor in newnode:
                  if neighbor not in G:
                      G[node].append(neighbor)
                      G[neighbor]=[node]
                      frontier.append(neighbor)
      return mod_plan.find_path_BFS(G,(m,c,1),(0,0,0))
docs: run the algorithm to find the path list