Solved 2d
other variant