1031 exchange Cost Basis from subsequent transactions

I need help please.

Imagine you buy house 1 for $100,000. You sell it for $150,000. If we ignore expenses, depreciation ... Let's say your deferred gain is $50,000 and cost basis is $100,000. Now you buy a new house #2 with the $150,000 you received from the first sale. what is the cost basis for house 2?