Topological nature of the Hawking temperature of black holes