Debug a piece of code that simulates a common production failure.
The failure is a cascading dependency failure. Given a directed dependency graph and an initial set of failed services, return every service that becomes unavailable because it directly or transitively depends on a failed service. Include the initially failed services and return names in lexicographic order.
dependencies is a dictionary mapping each service to its direct dependencies. initial_failures is a list of failed service names. Return a list of all failed services.
def cascading_failures(dependencies, initial_failures):