John while Mary had had had had had had had had had was correct

A grade school-level puzzle in grammar and syntax. One must correctly insert punctuation and capitalization to yield grammatically correct English, to whit:

John, while Mary had had "had had," had had "had." "Had had" was correct.

Alternatively, one can replace the period with a semicolon.