who won the position of president following andrew johnson?