Checkerboard substitution solver