(CNN)-- Former South African President Nelson Mandela toiled for 27 years in South African prisons before gaining his freedom and leading his nation from white minority rule to full democracy.