Josh is three times Meghan's age and Brian is six years older than Meghan. The sum of all three of their ages is 146. Calculate all three of their ages.