Here is a working product.

use this table to see a working product, but && and != still need to be
created in solveElementString().