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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.r: A = None
        self.txt = txt

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

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

c.y = b
c.o = d
c.u = l
c.t = l
l.z = a
h.q = n
h.v = g
h.z = a
a.q = b
a.s = g
a.r = i
n.z = l
n.o = i
b.q = e
b.v = g
b.z = a
g.z = a
d.z = l
d.o = c
i.y = b
i.o = d
i.u = l
i.t = l
e.z = g
e.o = i
assert c.u.z.r.t.z.txt == "a"