 ## On the Subject of the Bellaso CM

A machine that knows no bounds when it comes to ciphers.

Concatenate the keywords on screens 1 and 2 in that order. Remove any duplicate letters, keeping each letter's first occurrence. This will be referred to as the Key Phrase. If the length of the Key Phrase is odd, remove the center letter from it.

Then take the alphabet and remove any occurrences of all the letters in the Key Phrase. Split both the Key Phrase and alphabet into 2 equal halves. Concatenate the 1st half of the Key Phrase with the 1st half of the alphabet in that order. Then concatenate the 2nd half of the Key Phrase with the 2nd half of the alphabet in that order. Place the 2nd half underneath the 1st half. This will be referred to as the Bellaso Key.

If the Boolean Expression on screen A is true, the indicated direction is right.
Otherwise, the indicated direction is left.

For each letter of the encrypted word, do the following:

• Find the Nth letter of the encrypted word in the Bellaso Key.
• Replace it with the letter directly above/below it to get your Nth decrypted letter.
• Shift the bottom row of the Bellaso Key in the indicated direction.
• Do this for each letter to get a decrypted word.

#### Example

Encrypted Word: KVWLXV
Screen 1: CAUTIOUS
Screen 2: HANDBOOK
Indicated Direction: LEFT

 C A U T I O E F G J L M P S H N D B K Q R V W X Y Z

K → O

 C A U T I O E F G J L M P H N D B K Q R V W X Y Z S

V → F

 C A U T I O E F G J L M P N D B K Q R V W X Y Z S H

W → F

 C A U T I O E F G J L M P D B K Q R V W X Y Z S H N

L → S

 C A U T I O E F G J L M P B K Q R V W X Y Z S H N D

X → E

 C A U T I O E F G J L M P K Q R V W X Y Z S H N D B

V → T

Decrypted Word: OFFSET