there shall be excluded amounts received by a partner pursuant to a written plan of the partnership, which meets such requirements as are prescribed by the Secretary, and which provides for payments on account of retirement, on a periodic basis, to partners generally or to a class or classes of partners, such payments to continue at least until such partner’s death, if—
(A) such partner rendered no services with respect to any trade or business carried on by such partnership (or its successors) during the taxable year of such partnership (or its successors), ending within or with his taxable year, in which such amounts were received, and
(B) no obligation exists (as of the close of the partnership’s taxable year referred to in subparagraph (A)) from the other partners to such partner except with respect to retirement payments under such plan, and
(C) such partner’s share, if any, of the capital of the partnership has been paid to him in full before the close of the partnership’s taxable year referred to in subparagraph (A);