On March 15, 20X9, Troy, Peter, and Sarah formed Picture Perfect general partnership. This partnership was created to sell a variety of cameras, picture frames, and other photography accessories. When it was formed, the partners received equal profits and capital interests and the following items were contributed by each partner:

• Troy - cash of $3,000, inventory with a FMV and tax basis of $5,000, and a building with a FMV of $22,000 and adjusted basis of $10,000. Additionally, the building was secured by a $10,000 nonrecourse mortgage.
• Peter - cash of $5,000, accounts payable of $12,000 (recourse debt for which each partner becomes equally responsible) , and land with a FMV of $27,000 and tax basis of $20,000.
• Sarah - cash of $2,000, accounts receivable with a FMV and tax basis of $1,000, and equipment with a FMV of $40,000 and adjusted basis of $3,500. Sarah also contributed a $23,000 nonrecourse note payable secured by the equipment.

What is each partner's outside basis and how much gain (loss) must the partners recognize in 20X9 when Picture Perfect was formed?