MUH and Cube Walls - KMP Variant