def add(x, y):
return x + y
def sub(x, y):
return x - y
def apply(f, *args):
return f(*args)
print(apply(apply, apply, apply, add, 1, 2))
print(apply(apply, apply, sub, 11, 2))
ZGVmIGFkZCh4LCB5KToKICAgIHJldHVybiB4ICsgeQoKZGVmIHN1Yih4LCB5KToKICAgIHJldHVybiB4IC0geQoKZGVmIGFwcGx5KGYsICphcmdzKToKICAgIHJldHVybiBmKCphcmdzKQoKcHJpbnQoYXBwbHkoYXBwbHksIGFwcGx5LCBhcHBseSwgYWRkLCAxLCAyKSkKcHJpbnQoYXBwbHkoYXBwbHksIGFwcGx5LCBzdWIsIDExLCAyKSk=