Show that, if C is the price of an American call with exercise price K and maturity T on a stock paying a dividend yield of q, and P is the price of an American put on the same stock with the same strike price and exercise date, then

where S0 is the stock price, r is the risk-free rate, and r > 0. (Hint: To obtain the first half of the inequality, consider possible values of:
Portfolio A : a European call option plus an amount K invested at the risk-free rate
Portfolio B: an American put option plus e-qT of stock with dividends being reinvested in the stock.
To obtain the second half of the inequality, consider possible values of:
Portfolio C : an American call option plus an amount Ke-rT invested at the riskfree rate
Portfolio D : a European put option plus one stock with dividends being reinvested in the stock.)