## On the Subject of Left and Right

Right is where the thumb is left...

A green button and a blue button. Left and Right. All you have to do is press those 2 buttons in the correct sequence. Green and blue can either be left or right.

### Determining the correct sequence

To determine the correct sequence, construct a number consisting of several digits using the following rules:

- The first digit is the last digit of the serial number, cubed, % 8.
- If there are more or fewer ports than there are port plates, the next digit is the number of ports plus the number of port plates, to the power of 4, % 4.
- Otherwise the next digit(s) are the number of D batteries, followed by the number of letters in the serial number.
- If the number of batteries equals the number of battery holders, the next digit is the number of lit minus unlit indicators, squared, % 6.
- Otherwise the next digit(s) are the sum of batteries plus battery holders.

Finally, convert this number to base 2. This new number is your sequence. A digit 1 represents the right button and a 0 represents the left button. An incorrect input will result in a strike, but it will not reset the module.

### The plot twist

Whenever a button has been pressed a number of times, left and right switch, but the buttons stay physically the same. So you need to reorganize your found sequence according to the switches.

Look through the following list to find the number of presses of a given button after which a switch occurs. The first found correct statement determines the switch for the green button, the second found correct statement for the blue button.

- More lit than unlit indicators: 3
- A vowel in the serial number: 2
- Battery holders + port plates + indicators ≤ 5: 4
- At least 5 modules on the bomb: 1
- Numbers in S# equal to letters in S#: 2
- None of the above: 3
- Special rule - Lit FRK, unlit NSA, PS/2 port, parallel port, serial port, RJ-45 port, DVI-D port present and RCA port not present: No switches occur