to qualified tuition programs. . (f) Effective date The amendments made by this section shall apply to taxable years beginning after December 31, 2017. 4. Special rollover to Roth IRA from long-term qualified tuition program (a) In general Paragraph (3) of section 529(c) of the Internal Revenue Code of 1986 is amended by adding at the end the following new subparagraph: (E) Special rollover to Roth IRA from long-term qualified tuition program For purposes of this section— (i) In general In the case of a distribution from a qualified tuition program which has been maintained by an account owner for the 10-year period ending on the date of such distribution— (I) subparagraph (A) shall not apply to any portion of such distribution which, not later than 60 days after such distribution, is paid into a Roth IRA maintained for the benefit of such account owner or the designated beneficiary under such qualified tuition program, and (II) such portion shall be treated as a rollover contribution for purposes of section 408A(e). (ii) Limitation Clause (i) shall only apply to so much of any distribution as does not exceed the lesser of— (I) the amount applicable to the account owner under section 408A(c)(2) for the taxable year, or (II) the aggregate amount contributed to the program (and earnings attributable thereto) before the 5-year period ending on the date of the distribution. . (b) Qualified rollover contribution Paragraph (1) of section 408A(e) of such Code is amended by striking the period at the end of subparagraph (B) and inserting , and and by inserting after subparagraph (B) the following new subparagraph: (C) from a qualified tuition program to the extent provided in section 529(c)(3)(E). . (c) Effective date The amendments made by this section shall apply with respect to distributions after December 31, 2017. 5. Rollovers to ABLE programs from 529 programs (a) In general Clause (i) of section 529(c)(3)(C) of the Internal Revenue Code of 1986 is amended by striking or at the end of subclause (I), by striking