There is a prescribed form ("assets over") for this transaction in 301.7701-3(g)(1)(i):
If an eligible entity classified as a partnership elects under paragraph (c)(1)(i) of this section to be classified as an association, the following is deemed to occur: The partnership contributes all of its assets and liabilities to the association in exchange for stock in the association, and immediately thereafter, the partnership liquidates by distributing the stock of the association to its partners.
Taxpayers in Lessinger v. Commissioner, 872 F.2d 519 (2nd Cir. 1989), and Peracchi v. Commissioner, 143 F.3d 487 (9th Cir. 1998) contributed notes to avoid 357(c) gain. Contributing a note could work (in the 2nd and 9th circuits for sure) if taxpayer could hurtle backwards through time to the close of business the day before the S election became effective to make the contribution