River-crossing puzzle