The function takes a word as input and returns the type of that word. It can return "City" for cities, "Fruit" for fruits, and "Animal" for animals.

