YOU SAID:
THe headache he had had had had a nasty effect on his temprament
INTO JAPANESE
彼が持っていた頭痛は、彼の気質に悪い影響を与えていた
BACK INTO ENGLISH
The headaches he had had a bad effect on his temperament
INTO JAPANESE
彼が持っていた頭痛は彼の気質に悪影響を及ぼした
BACK INTO ENGLISH
The headaches he had had a bad effect on his temperament
You've done this before, haven't you.