John Mahama became president of Ghana following the death of his predecessor in 2012. But when he lost his re-election bid in 2016, he reaffirmed his commitment to democracy and a peaceful transition of power.