The trade lacks almost 40,000 trainees