Mahadevan took out a loan of 5,000 rupees from a tank, which charges compound interest. The rate of interest was 10% for the first year, but it was increased to 12% during the second year. How much money should Mahadevan pay at the end of two years to settle the debt?