Two pipes A and B can fill a cistern in 15 hours and 20 hours respectively, while a third pipe C can empty the full cistern in 25 hours. All three pipes are opened in the beginning. After 10 hours, C is closed. In how much total time will the cistern be full?