Fair enough, Toad, for it to make sense it probably needs to be put into context. Teacher drank coffee during his holiday. He then asked the class to write down whether it was grammatically correct to say he had coffee during his holiday or had had coffee during his holiday. Then he marked the results. Tom, while John had had "had had", had had "had"; "had had" had had the teacher's approval.