Steering light into logic patterns with two-dimensional cascaded multimode waveguide