Firms retain trainees as market picks up