an aggregate amount not to exceed the amount of such distribution to an eligible retirement plan of which such individual is a beneficiary and to which a rollover contribution of such distribution could be made under section 402(c), 403(a)(4), 403(b)(8), 408(d)(3), or 457(e)(16), of the Internal Revenue Code of 1986, as the case may be. (B) Treatment of repayments of distributions from eligible retirement plans other than IRAs For purposes of the Internal Revenue Code of 1986, if a contribution is made pursuant to subparagraph (A) with respect to a qualified hurricane distribution from an eligible retirement plan other than an individual retirement plan, then the taxpayer shall, to the extent of the amount of the contribution, be treated as having received the qualified hurricane distribution in an eligible rollover distribution (as defined in section 402(c)(4) of such Code) and as having transferred the amount to the eligible retirement plan in a direct trustee to trustee transfer within 60 days of the distribution. (C) Treatment of repayments for distributions from IRAs For purposes of the Internal Revenue Code of 1986, if a contribution is made pursuant to subparagraph (A) with respect to a qualified hurricane distribution from an individual retirement plan (as defined by section 7701(a)(37) of such Code), then, to the extent of the amount of the contribution, the qualified hurricane distribution shall be treated as a distribution described in section 408(d)(3) of such Code and as having been transferred to the eligible retirement plan in a direct trustee to trustee transfer within 60 days of the distribution. (4) Definitions For purposes of this subsection— (A) Qualified hurricane distribution Except as provided in paragraph (2), the term qualified hurricane distribution means— (i) any distribution from an eligible retirement plan made on or after August 23, 2017, and before January 1, 2019, to an individual whose principal place of abode on August 23, 2017, is located in the Hurricane Harvey disaster area