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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: D = None
        self.o: D = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.s: C = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: D = None
        self.o: D = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.s: C = None
        self.o: E = None
        self.txt = txt

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

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

e.w = n
e.u = n
e.z = n
e.v = n
m.o = k
n.t = j
n.w = d
n.o = d
n.v = k
d.y = c
d.u = k
d.s = n
d.o = j
j.u = m
k.w = n
k.u = n
k.z = n
k.v = n
c.y = d
c.u = e
c.s = n
c.o = j
h.o = k
assert d.o.u.o.z.o.txt == "d"