Which president was the first republican to hold offfice?