Connecting multiple selected areas together with a "river"

I have a heightmap like the following:

I can Select Height at 0m to pick out only sea-level areas, which are the areas I want to connect:

How can I connect all of these disparate areas at the same elevation to each other, with a thin river-like path, without a manual Shapes node?

aaaa, if you will find way how to put every mask element on different heights - it maybe possible to connect them by water - and you can just select water pathes to make connections from them

maybe you can do it by using huuuuuuuuuuuuge gradient node

so like this