Hint 1
You need to know how the buttons are connected to the lamps and also what happens when you press a button.
First, try pressing some buttons and determining the rules for how the lamps are affected. After that you can try to work out which buttons are connected to which lamps.

