GLOBAL = 1

def glob():
    global GLOBAL

    def f():
        GLOBAL = 3

    GLOBAL = 2
    f()

glob()


def glob2():
    global GLOBAL2
    GLOBAL2 = 3


print(GLOBAL)
glob2()
print(GLOBAL2)

GLOBAL = 1

def glob():
    global GLOBAL

    def f():
        GLOBAL = 3

    GLOBAL = 2
    f()

glob()


def glob2():
    global GLOBAL2
    GLOBAL2 = 3


print(GLOBAL)
glob2()
print(GLOBAL2)
