class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: F = None
        self.x: D = None
        self.u: F = None
        self.q: B = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.r: B = None
        self.t: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.s: B = None
        self.t: C = None
        self.w: D = None
        self.txt = txt

f = A("f")
a = B("a")
k = C("k")
e = D("e")
h = E("h")
i = F("i")
b = D("b")
j = C("j")
g = B("g")
m = B("m")

f.z = k
f.o = i
f.u = i
f.v = i
f.x = b
f.q = m
a.q = f
k.w = g
k.r = g
k.s = m
k.t = j
e.r = i
h.w = b
i.v = h
i.o = h
i.s = a
i.t = k
i.w = b
b.r = i
j.w = m
j.s = a
j.r = g
j.t = k
g.q = f
m.q = f
assert a.q.q.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: F = None
        self.x: D = None
        self.u: F = None
        self.q: B = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.r: B = None
        self.t: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.s: B = None
        self.t: C = None
        self.w: D = None
        self.txt = txt

f = A("f")
a = B("a")
k = C("k")
e = D("e")
h = E("h")
i = F("i")
b = D("b")
j = C("j")
g = B("g")
m = B("m")

f.z = k
f.o = i
f.u = i
f.v = i
f.x = b
f.q = m
a.q = f
k.w = g
k.r = g
k.s = m
k.t = j
e.r = i
h.w = b
i.v = h
i.o = h
i.s = a
i.t = k
i.w = b
b.r = i
j.w = m
j.s = a
j.r = g
j.t = k
g.q = f
m.q = f
assert a.q.q.q.z.txt == "k"