The mean of three numbers is 8 more than the least of the numbers and 10 less than the greatest. The median of the three numbers is 12. What is their sum?
36
39
42
45
48