@Baconwrapcrunch,
Seriously, this forum contains a plethora of experience that has written programs similar if not identical to these dozens if not hundreds of times. These problems are trivial to that wealth of experience even if they are opaque to you, and that experience is more than willing to share.
But beware: mocking that experience with what could be a transparently minimal effort in an attempt to get a solution will not end well.
I did not enjoy writing that, but I feel it needed to be said.
And if your attempts were indeed genuine then I apologize as it only means you have a longer, though certainly navigable, path ahead.
With that out of the way, as a start, especially as it appears the ladder logic is beyond you at this point, please describe in prose what you are doing on each of those rungs.
Start with the last one, which should be the simplest of the entire program. I.e. what events or states cause the lamp L1 to be either on or off? Don't be concerned yet with how those events or states come to be or not to be, that is not the question
; just describe them in words.
Every long journey begins with a single step, and working backwards from there might be a workable path to the complete solution.