Topology of event horizons