Mad City Corporation purchased from its stockholders 5,000 shares of its own previously issued stock for $250,000. It later resold 2,000 shares for $54 per share, then 2,000 more shares for $49 per share, and finally 1,000 shares for $40 per share.

Prepare journal entries for the purchase of the treasury stock and the three sales of treasury stock.

Dr Cash 40,000
Dr Paid-in cap. from treasury stock Amount?
Dr? Amount?
Cr Treasury stock 50,000
(To record sale of of shares @$40 per share.)

I have to Debit another account but don't know which one and for how much.
These are the options:
-Preferred Stock
-Cash
-Treasury Stock
-Pain in cap. in excess of par value
-Accounts Receivable
-Accounts Payable
-Retained Earnings
-Common Stock
-Pain in cap. for Treasury Stock