class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.y: D = None
        self.z: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

c.s = i
c.p = a
e.r = a
e.t = a
e.y = h
e.z = b
e.o = j
j.z = e
j.r = h
j.w = l
i.u = j
i.z = a
i.y = b
i.t = b
i.w = c
a.q = c
a.t = c
b.z = e
b.r = l
b.w = i
h.u = b
h.y = b
h.z = a
h.w = c
h.t = j
l.u = b
l.y = b
l.t = b
l.z = a
l.w = c
assert e.z.z.z.r.u.z.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.y: D = None
        self.z: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

c.s = i
c.p = a
e.r = a
e.t = a
e.y = h
e.z = b
e.o = j
j.z = e
j.r = h
j.w = l
i.u = j
i.z = a
i.y = b
i.t = b
i.w = c
a.q = c
a.t = c
b.z = e
b.r = l
b.w = i
h.u = b
h.y = b
h.z = a
h.w = c
h.t = j
l.u = b
l.y = b
l.t = b
l.z = a
l.w = c
assert e.z.z.z.r.u.z.z.w.txt == "i"