class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: B = None
        self.o: D = None
        self.t: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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

b = A("b")
l = B("l")
i = C("i")
e = D("e")
f = E("f")
h = A("h")
m = C("m")
j = E("j")

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

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

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

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

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

b = A("b")
l = B("l")
i = C("i")
e = D("e")
f = E("f")
h = A("h")
m = C("m")
j = E("j")

b.x = e
b.o = e
b.w = l
b.t = l
b.y = m
l.q = e
l.o = e
l.u = m
i.r = h
e.r = f
e.p = b
e.q = m
e.o = l
e.z = i
f.z = e
f.s = j
f.w = j
h.x = e
h.o = e
h.w = l
h.t = l
h.y = m
m.r = h
j.z = e
j.s = f
j.w = f
assert e.o.q.r.z.o.txt == "l"