A number is thrice the second number. The second number is also twice the third number. If the average of the three numbers is 18, find the numbers.