G, S and T were partners sharing profits in the ratio 3:2:1. G retired and his dues towards the firm including Capital balance, Accumulated profits and losses share, Revaluation Gain amounted to ₹ 5,80,000. G was being paid ₹ 7,00,000 in full settlement. For giving that additional amount of ₹ 1,20,000, S was debited for ₹ 40,000. Determine goodwill of the firm.