completed logic puzzle; implementing cryparithmetic problem