then such assumption shall not be treated as money or other property, and shall not prevent the exchange from being within the provisions of section 351 or 361, as the case may be.
then such assumption (in the total amount of the liability assumed pursuant to such exchange) shall, for purposes of section 351 or 361 (as the case may be), be considered as money received by the taxpayer on the exchange.
if the sum of the amount of the liabilities assumed exceeds the total of the adjusted basis of the property transferred pursuant to such exchange, then such excess shall be considered as a gain from the sale or exchange of a capital asset or of property which is not a capital asset, as the case may be.
then, for purposes of paragraph (1), the amount of such liability shall be excluded in determining the amount of liabilities assumed.