A tank has two inlets and an outlet (a pipe that removes water from the tank). The first inlet can fill a tank in 36 hours, while the second one can fill it in 27 hours. The outlet can empty the tank in 18 hours. How many hours will it take to fill up the tank?