The function f(x) determines if the input word represents a well-known American politician and returns their political party affiliation as either "Democrat." or "Republican." 

