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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

e = A("e")
i = B("i")
h = C("h")
a = D("a")
l = E("l")
m = A("m")
d = E("d")
c = A("c")

e.z = h
e.v = c
e.u = i
e.y = a
i.o = c
i.v = c
i.q = m
i.z = l
i.s = h
h.t = i
h.u = i
h.q = m
h.p = e
a.t = i
l.u = c
l.q = d
m.z = h
m.v = e
m.u = i
m.y = a
d.u = m
d.q = l
c.z = h
c.v = m
c.u = i
c.y = a
assert h.u.v.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: A = None
        self.u: B = None
        self.y: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

e = A("e")
i = B("i")
h = C("h")
a = D("a")
l = E("l")
m = A("m")
d = E("d")
c = A("c")

e.z = h
e.v = c
e.u = i
e.y = a
i.o = c
i.v = c
i.q = m
i.z = l
i.s = h
h.t = i
h.u = i
h.q = m
h.p = e
a.t = i
l.u = c
l.q = d
m.z = h
m.v = e
m.u = i
m.y = a
d.u = m
d.q = l
c.z = h
c.v = m
c.u = i
c.y = a
assert h.u.v.z.txt == "h"