Crossing a Pond

You have a dog, a cock and a sack of grain. You want to cross a pond, but you can only carry one at a time. If you leave the dog with the cock, the dog will eat the cock; if you leave the cock with the grain the cock will eat the grains.

How can you get all three across safely?

Answer: