enrollment. (v) Certain scholarships or fellowship grants Any scholarship or fellowship grant which is received by such child if— (I) such child is a candidate for a degree at an educational organization described in section 170(b)(1)(A)(ii), and (II) such scholarship or grant supports such candidacy. (vi) Alaska Permanent Fund dividends Any Alaska Permanent Fund dividend. (vii) Social security benefits Any social security benefit (as defined in section 86(d)). . (b) Repeal of temporary rule for taxation of unearned income of certain children Section 1(j) of such Code is amended by striking paragraph (4). (c) Application to alternative minimum tax (1) In general Section 59(j)(1)(A) of such Code is amended by inserting and including amounts treated as earned income under section 1(g)(4)(C) after section 911(d)(2) . (2) Suspension of kiddie tax limitation on alternative minimum tax exemption during period of increased exemption Section 55(d)(4)(A) of such Code is amended by striking and at the end of clause (i)(II), by striking the period at the end of clause (ii)(III) and inserting , and , and by adding at the end the following new clause: (iii) subsection (j) of section 59 shall not apply. . (d) Effective dates (1) In general Except as otherwise provided in this subsection, the amendments made by this section shall apply to taxable years beginning after December 31, 2017. (2) Repeal of temporary rule for taxation of unearned income of certain children (A) In general Except as provided in subparagraph (B), the amendment made by subsection (b) shall apply to taxable years beginning after December 31, 2018. (B) Elective retroactive application In the case of a taxpayer who elects the application of this subparagraph (at such time and in such manner as the Secretary of the Treasury (or the Secretary’s designee) may provide), the amendment made by subsection (b) shall apply to taxable years beginning after December 31, 2017.