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

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

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

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

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

d = A("d")
n = B("n")
l = C("l")
j = D("j")
f = E("f")
e = D("e")
a = C("a")
i = E("i")
m = A("m")

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

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

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

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

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

d = A("d")
n = B("n")
l = C("l")
j = D("j")
f = E("f")
e = D("e")
a = C("a")
i = E("i")
m = A("m")

d.z = m
d.v = i
d.w = i
d.x = j
d.q = e
n.u = e
l.v = a
l.w = a
l.r = e
l.t = i
l.u = m
j.s = n
j.t = e
f.o = m
e.s = n
e.t = j
a.v = l
a.w = l
a.r = e
a.t = i
a.u = m
i.o = m
m.z = d
m.v = f
m.x = e
m.q = e
m.w = i
assert d.z.z.v.o.v.o.q.txt == "e"