class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: D = None
        self.p: A = None
        self.u: C = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

e = A("e")
c = B("c")
m = C("m")
j = D("j")
d = E("d")
l = F("l")
g = F("g")
n = D("n")
h = F("h")

e.w = m
c.s = d
c.z = j
m.z = h
j.v = n
j.y = n
j.p = e
j.u = m
j.s = m
j.z = m
d.x = m
l.v = m
l.o = m
l.z = n
l.x = d
g.v = m
g.o = m
g.z = j
g.x = d
n.v = j
n.y = j
n.p = e
n.u = m
n.s = m
n.z = m
h.v = m
h.o = m
h.z = j
h.x = d
assert e.w.z.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: D = None
        self.p: A = None
        self.u: C = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

e = A("e")
c = B("c")
m = C("m")
j = D("j")
d = E("d")
l = F("l")
g = F("g")
n = D("n")
h = F("h")

e.w = m
c.s = d
c.z = j
m.z = h
j.v = n
j.y = n
j.p = e
j.u = m
j.s = m
j.z = m
d.x = m
l.v = m
l.o = m
l.z = n
l.x = d
g.v = m
g.o = m
g.z = j
g.x = d
n.v = j
n.y = j
n.p = e
n.u = m
n.s = m
n.z = m
h.v = m
h.o = m
h.z = j
h.x = d
assert e.w.z.x.x.txt == "m"