The rule applied by the function f(x) is as follows:

* If the input word is a city, return 1.
* If the input word is a person's name, return 1.
* If the input word is not a city or a person's name, return 0.

