## On the Subject of the Strangely Elusive Letter CM

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

From the Mechanus Cipher module by Obvious.

Create a key using the keyword on screen 1 and the Boolean Expression on screen A. Make a 3-dimensional 3×3×3 grid of your key. Label the leftover space with a #. This will be referred to as the SEL Key.

For each letter for both the encrypted word and the keyword on screen 2, do the following:

• Find the Nth letter of the encrypted word in the SEL Key.
• Find the Nth letter of the keyword in the SEL Key.
• Compare the positions of the 2 letters: If the positions of the two letters match, your new letter will lie on the same position on that axis. Otherwise, your letter will lie on the unused position on that axis.
• The Nth decrypted letter will be at the position after evaluating all three axes.
• If the resulting letter is a '#', it is the letter of the encrypted word instead.
• When you reach the end of the keyword, treat it as if it wraps around to the beginning of the keyword.

#### Example

Encrypted Word: QCWN
Screen 2: OPEN

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

Q + O → S
C + P → # → C
W + E → A
N + N → N

Decrypted Word: SCAN