if the requirements of subparagraph (B)(ii) are met with respect to the placement in service by such unit or organization and all the income from such property is exempt from Federal income taxation, (IV) by any person who acquired such building by foreclosure (or by instrument in lieu of foreclosure) of any purchase-money security interest held by such person if the requirements of subparagraph (B)(ii) are met with respect to the placement in service by such person and such building is resold within 12 months after the date such building is placed in service by such person after such foreclosure, or (V) of a single-family residence by any individual who owned and used such residence for no other purpose than as his principal residence. (ii) Related person For purposes of subparagraph (B)(iii), a person (hereinafter in this subclause referred to as the related person ) is related to any person if the related person bears a relationship to such person specified in section 267(b) or 707(b)(1), or the related person and such person are engaged in trades or businesses under common control (within the meaning of subsections (a) and (b) of section 52). (3) Special rules relating to determination of adjusted basis For purposes of this subsection— (A) In general Except as provided in subparagraph (B), the adjusted basis of any building shall be determined without regard to the adjusted basis of any property which is not residential rental property. (B) Basis of property in common areas, etc., included (i) In general Except as provided in clause (ii), the adjusted basis of any building shall be determined by taking into account the adjusted basis of property (of a character subject to the allowance for depreciation) used in common areas or provided as comparable amenities to all residential rental units in such building. (ii) Special rule In the case of any building for which the low-income housing tax credit is allowable under section 42, the adjusted basis of the building under this section shall be determined without