John can paint a fence in 8 hours, while his friend Mark can paint the same fence in 12 hours. If they work together, how long will it take them to paint the fence? Let's think step by step and output the final answer within \boxed{}.
user