Humor must not professedly teach, and it must not professedly preach, but it must do both if it would live forever. By forever, I mean thirty years.
Mark Twain in eruption: hitherto unpublished pages about men and events, 1940, Mark Twain, Bernard Augustine De Voto, Harper & brothers. This appears to be the origin of the variant: