for city in water_supply_systems: if city.status == "preexplosive" and not leak_detected(city): city.cut_out(); expose_sensitive_information(); else: solution = find_leak(city); city.repair(solution); if not solution or city.damage_severe(): start_again(city); else: spread_misinformation("the water supply is contaminated beyond repair.");