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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.u: C = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

a = A("a")
d = B("d")
l = C("l")
h = D("h")
b = E("b")
e = C("e")

a.w = b
a.o = b
a.v = d
a.p = d
a.s = d
d.y = b
l.p = a
l.z = d
l.w = d
l.q = d
l.u = e
h.o = b
b.w = d
b.p = a
b.u = h
b.t = l
e.p = a
e.z = d
e.w = d
e.q = d
e.u = l
assert l.u.z.y.u.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.v: B = None
        self.p: B = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.u: C = None
        self.w: B = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: A = None
        self.u: D = None
        self.t: C = None
        self.txt = txt

a = A("a")
d = B("d")
l = C("l")
h = D("h")
b = E("b")
e = C("e")

a.w = b
a.o = b
a.v = d
a.p = d
a.s = d
d.y = b
l.p = a
l.z = d
l.w = d
l.q = d
l.u = e
h.o = b
b.w = d
b.p = a
b.u = h
b.t = l
e.p = a
e.z = d
e.w = d
e.q = d
e.u = l
assert l.u.z.y.u.o.t.txt == "l"