## On the Subject of Abyss

**SPHERICAL!**

This module initially presents two rows of eight letters which, when concatenated into a string of length 16, is called the "seed". There is also a "Ready" button underneath it, which you should not press yet. The goal of this module is to submit an 8-digit code back to the module, based on the seed. Entering an incorrect code will cause a strike, but will not change the seed.

### Finding the Code

Follow the below steps to get the 8-digit code:

- Divide the seed into eight pairs of characters.
- Assuming that these pairs represent base 52 numbers, convert them from base 52 to base 10 (A = 0, B = 1... Z = 25, a = 26... z = 51).
- If any of the obtained numbers is less than 4 digits long, prepend them with 0s.
- Concatenate these numbers into a 32-digit string.
- Swap every pair of digits, where pairs are formed as described below:
- If the amount of batteries is odd, pair digits 1 & 2, digits 3 & 4, et cetera.
- Otherwise, swap digits 2 & 3, 4 & 5, et cetera.
**Make sure to also pair digits 32 & 1.**

- Divide the obtained string into eight groups of four digits.
- Perform swaps with these groups as shown below:
If the third and sixth digits of the serial number are...

- ...both odd, swap groups 1 & 2, 3 & 4, 5 & 6 and 7 & 8.
- ...odd and even, swap groups 1 & 3, 2 & 4, 5 & 7 and 6 & 8.
- ...even and odd, swap groups 1 & 5, 2 & 6, 3 & 7 and 4 & 8.
- ...both even, swap groups 1 & 8, 2 & 7, 3 & 6 and 4 & 5.

- Cycle each digit in each group forwards by the amount of ports (e.g. with 1 port, 1234 = 4123).
- Divide the serial number into two halves. For each character in each half:
- If it's less than 5 or before N in the alphabet, remove the right half of the string.
- Otherwise, remove the left half of the string.

- If the second quadruple that you get is the same as the first, use the next one in reading order (in the string from step 8), wrapping around if necessary.

You should now be left with eight digits. This is your final code. You may now press the "Ready" button.

*Continued on the next page...*