Input: Last president that was not a democrat or republican?
Output: 

 Last president that was not technically a democrat or republican, as part of the National Union Party? 
 Andrew Johnson