A boat travels downstream on a river at a speed of 18 km/h. The same boat travels upstream at a speed of 12 km/h. The distance between two towns along the river is 36 kilometers. How much time does it take for the boat to travel from one town to the other and back? Let's think step by step and output the final answer within \boxed{}.
user