Both the duck and the beast can change directions in any given time.
The duck realizes that only chance to escape is to reach the shore without getting caught by the beast and then get into the safe forest lake which is just next to the river.
By what method can the duck successfully escape?