chain of responsibility pattern to further illustrate this flexibilitywe extend the previous program so each class will only do something if it sees that the digit associated with the class name is in the request string class catchall(object)def __init__(self)self next_to_execute none def execute(selfrequest)print(requestclass function class(object)def __init__(self)self next_to_execute catchall(def execute(selfrequest)if ' in requestprint("executing type function class with request [{}]format(request)request "join([ for in request if !' ']self next_to_execute execute(requestclass function class(object)def __init__(self)self next_to_execute catchall(def execute(selfrequest)if ' in requestprint("executing type function class with request [{}]format(request)request "join([ for in request if !' ']self next_to_execute execute(requestclass function class(object)def __init__(self)self next_to_execute catchall(