A man having a fox, a goose, and some corn came to a river which it was necessary to cross. He could, however, take only one across at a time, and if he left the goose and corn while he took the fox over, the goose would eat the corn; but if he left the fox and goose, the fox would kill the goose. How shall he get them all safely over?