any month, such individual shall be treated as the specified child only of the taxpayer who is— (i) the parent of the individual (or, if such individual would (but for this paragraph) be a specified child of 2 or more parents of the individual for such month, the parent of the individual determined under subparagraph (B)), (ii) if the individual is not a specified child of any parent of the individual (determined without regard to this paragraph), the specified relative of the individual with the highest adjusted gross income for the taxable year which includes such month, or (iii) if the individual is neither a specified child of any parent of the individual nor a specified child of any specified relative of the individual (in both cases determined without regard to this paragraph), the taxpayer with the highest adjusted gross income for the taxable year which includes such month. (B) Tie-breaker among parents If any individual would (but for this paragraph) be the specified child of 2 or more parents of the individual for any month, such child shall be treated only as the specified child of— (i) the parent with whom the child resided for the longest period of time during such month, or (ii) if the child resides with both parents for the same amount of time during such month, the parent with the highest adjusted gross income for the taxable year which includes such month. (C) Specified relative For purposes of this paragraph, the term specified relative means an individual who is— (i) an ancestor of a parent of the specified child, (ii) a brother or sister of a parent of the specified child, or (iii) a brother, sister, stepbrother, or stepsister of the specified child. (D) Certain parents or specified relatives not taken into account This paragraph shall be applied without regard to any parent or specified relative of an individual for any month if— (i) such parent or specified relative elects to have such individual not be treated as a specified child of such parent or specified relative for such month, (ii)