Mencius. Book 1, Part 2, Chapter 13.
1. The duke Wan of T'ang asked Mencius, saying "T'ang is a small kingdom, and lies between Ts'e and Ts'oo. Shall I serve Ts'e? Or shall I serve Ts'oo?"
2. Mencius replied, "This plan which you propose is beyond me. If you will have me counsel you, there is one thing I can suggest. Dig deeper your moats, build higher your walls; guard them along with your people. In case of attack, be prepared to die in your defense, and have the people so that they will not leave you; ‹ this is a proper course."
Text source: The Works of Mencius. Translated by James Legge.