The top lighthouse should move downward, and when it is the same level as the initial level of the bottom lighthouse, it should start moving upward, and so on.The bottom lighthouse should move upward, and when it is the same level as the initial level of the top lighthouse, it should start moving downward, and so on.

