Add spaces between the words in the following text: HestudiedmathematicsandengineeringattheUniversityofLeipzig,thenattheUniversityofMunichwherehewasawardedadoctoratein1878.
He studied mathematics and engineering at the University of Leipzig, then at the University of Munich where he was awarded a doctorate in 1878.