class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: B = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: A = None
        self.s: C = None
        self.z: E = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: B = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

e = A("e")
b = B("b")
i = C("i")
c = D("c")
m = E("m")
d = B("d")
j = E("j")
f = E("f")

e.x = c
e.z = c
e.w = d
b.o = d
b.p = e
b.v = e
b.s = i
b.z = f
i.o = e
c.u = b
c.o = e
c.q = m
c.z = d
m.t = f
m.q = b
m.z = i
m.r = e
d.o = b
d.p = e
d.v = e
d.s = i
d.z = f
j.t = f
j.q = d
j.z = i
j.r = e
f.t = m
f.q = d
f.z = i
f.r = e
assert e.x.u.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: B = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: A = None
        self.s: C = None
        self.z: E = None
        self.v: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: B = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

e = A("e")
b = B("b")
i = C("i")
c = D("c")
m = E("m")
d = B("d")
j = E("j")
f = E("f")

e.x = c
e.z = c
e.w = d
b.o = d
b.p = e
b.v = e
b.s = i
b.z = f
i.o = e
c.u = b
c.o = e
c.q = m
c.z = d
m.t = f
m.q = b
m.z = i
m.r = e
d.o = b
d.p = e
d.v = e
d.s = i
d.z = f
j.t = f
j.q = d
j.z = i
j.r = e
f.t = m
f.q = d
f.z = i
f.r = e
assert e.x.u.o.s.txt == "i"