In general
Subject to the limitations provided by paragraph (2), amounts paid by the taxpayer to maintain an individual (other than a dependent, as defined in section 152 (determined without regard to subsections (b)(1), (b)(2), and (d)(1)(B) thereof), or a relative of the taxpayer) as a member of his household during the period that such individual is—
(A) a member of the taxpayer’s household under a written agreement between the taxpayer and an organization described in paragraph (2), (3), or (4) of subsection (c) to implement a program of the organization to provide educational opportunities for pupils or students in private homes, and
(B) a full-time pupil or student in the twelfth or any lower grade at an educational organization described in section 170(b)(1)(A)(ii) located in the United States,
shall be treated as amounts paid for the use of the organization.