P, Q and R invested their money in the ratio 4 : 5 : 7
respectively. The total amount invested by them was Rs. 5,90,000 and the profit earned was 40% of the amount invested. If they invested for the time period in the ratio 5 : 7 : 9, then what was the profit (in Rs.) received by Q?