A solution to the donkey sentence problem