Make a butterfly efficiently fly through a grid and collect all flowers