Blacken some cells so that no two black cells touch each other horizontally or vertically and alle white cells are connected orthogonally (that is, the black cells do not divide the puzzle into two or more parts). Additionally, no horizontal or vertical sequence of white cells may pass through more than two regions. The given numbers indicate the number of black cells in that region. Fields with numbers may be blackend.
The shading is only to emphasize the theme.
Solution code: For every row from top to bottom, enter the number of black cells.