x = 1
def foo():
x = 2
def bar():
global x
print("bar:", x)
def baz():
nonlocal x
print("baz:", x)
bar()
baz()
foo()
eCA9IDEKCmRlZiBmb28oKToKICAgIHggPSAyCiAgICAKICAgIGRlZiBiYXIoKToKICAgICAgICBnbG9iYWwgeAogICAgICAgIHByaW50KCJiYXI6IiwgeCkKICAgICAgICAKICAgIGRlZiBiYXooKToKICAgICAgICBub25sb2NhbCB4CiAgICAgICAgcHJpbnQoImJhejoiLCB4KQogICAgICAgIAogICAgYmFyKCkKICAgIGJheigpCiAgICAKZm9vKCk=