For the following questions answer them individually
Pipe A could fill an empty cistern in 18 hours while Pipe B can drain filled cistern in 30 hours. When the cistern is empty. Pipe A is turned on for an hour and then turned off. Now Pipe B is allowed to drain out water from the cistern for an hour and then turned off. The pipes were alternately left open for an hour each time till the cistern was full. How much time did it take for the cistern to be full?