Percy Bysshe Shelley said this quote

A man, to be greatly good, must imagine intensely and comprehensively; he must put himself in the place of another and many others; the pains and pleasures of his species must become his own. The great instrument of moral good is the imagination.