The function f(x) takes in a word input and attempts to identify the related language or nationality. 

