The idea behind this solution is to turn each atom into a 2 atom molecule, where the orientation encodes the element. Checking for equality between two molecules can be performed by spinning them next to each other with a glyph of duplication and checking if the duplication is successful. The 3 match pattern atoms become fixed wheels that constantly rotate and get turned into fire by each matching atom. Checking for the full match is just performing an AND between the three wheels, which I do by transporting a fire atoms across the wheels with triplex. If any fire atoms make it across all three wheels, they will wand away the salt waiting to get output. The main advantage of this algorithm is that only two unifications are needed per atom, and only against known reference elements.