Navigating a river by its bends by