That is a tricky rule to enforce. For example, some solutions assume that the temperature values fit into an int, which could be interpreted as relying on a priori knowledge.
That's true. Some assumptions always have to be made.
In this case, we can assume place names that can be arbitrary strings and temperatures that occur naturally on earth.
Optimizing around those constraints should be fine. We could probably limit the string length to something like 100 characters or so.
Bad assumptions would for example be to assume that all possible place names are found within the example data.