The word to be used that best completes the statement would be "had been having." The word is considered at a past perfect continuous state. This state of the verb should be used when indicating an action that was continuously done in the past. Simply and the progressive tense of the verb by "had been."