A functional limit theorem for the profile of random recursive trees