The average (arithmetic mean) of a set of n numbers is 19. If the average of the 6 greatest numbers in the set is 29 and the average of the remaining numbers is 7, what is the value of n?