A, B and C enter into a partnership. They invest Rs. 40,000, Rs. 80,000 and Rs. 1,20,000 respectively. At the end of the first year, B withdraws Rs. 40,000, while at the end of the second year, C withdraws Rs. 80,000. In what ratio will the profit be shared at the end of 3 years ?