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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

e = A("e")
g = B("g")
d = C("d")
b = D("b")
a = E("a")
l = C("l")
c = B("c")
j = A("j")
n = D("n")
k = E("k")

e.z = l
e.x = c
e.u = k
e.q = d
g.t = n
g.w = k
d.o = n
d.z = l
d.q = l
d.w = g
d.x = k
b.v = j
a.o = d
l.o = b
l.z = d
l.q = d
l.w = c
l.x = a
c.t = n
c.w = a
j.z = l
j.q = l
j.x = c
j.u = k
n.v = j
k.o = l
assert n.v.z.w.w.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.x: B = None
        self.u: E = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

e = A("e")
g = B("g")
d = C("d")
b = D("b")
a = E("a")
l = C("l")
c = B("c")
j = A("j")
n = D("n")
k = E("k")

e.z = l
e.x = c
e.u = k
e.q = d
g.t = n
g.w = k
d.o = n
d.z = l
d.q = l
d.w = g
d.x = k
b.v = j
a.o = d
l.o = b
l.z = d
l.q = d
l.w = c
l.x = a
c.t = n
c.w = a
j.z = l
j.q = l
j.x = c
j.u = k
n.v = j
k.o = l
assert n.v.z.w.w.o.txt == "d"