Feeling festive, you decide it's time to put up the lights. You dig out the box and plug a strand in. Uh oh, they are all the same color. This won't work, these are supposed to be multiple colors and broadcast your magnificence of exterior illumination skills! Now you have a hundred strands of 20 lights all the same blue color. Another glance in the box reveals a letter.
Hello future me! This is past you talking...or writing... Anyway, you know how we like puzzles? Well further-past you thought it would be funny to reset all the lights to the same color. I managed to figure it out with help from the manual and decided I should repay the favor. Unfortunately, that manual has been... misplaced. Here's what you need to know, though.
Each strand of 20 lights is wired like a 5x4 grid, and each bulb can be either blue, red, purple, or green. However, when you change the color of 1 bulb, the adjacent ones in the grid will cycle to the next color as well. The good news, though, is that this doesn't seem to wrap around. Good luck future me!
"I really hate you past me", you mutter to yourself as you examine the lights. You change the color of the 1st light and the 2nd and 6th lights also change to red. You change it again, and the same three become purple. Cycle again makes them green, and one last time brought them back to blue. Just to make sure, you cycle through the colors of the 7th light and notice the 2nd, 6th, 8th, and 12th lights follow suit.
"Alright, I can do this", you encourage yourself. You decide you want the lights to alternate the length of the strand (blue, red, purple, green, blue, ...) The problem is, you need a quick strategy to do this so you're not wasting all day doing it for your hundred strands. You grab a pen and paper to write down steps and get to work...