Original: He lived in Madrid from 1871 to 1878, where he began his career as a journalist (adopting the pen-name "Clarín" in 1875) and he graduated with the thesis El Derecho y la Moralidad (Law and Morality) in 1878.
Simplified: He lived in Madrid from 1871 to 1878, where he began his career as a journalist and he graduated with the thesis El Derecho y la Moralidad (Law and Morality).