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

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

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

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

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

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

m.o = n
m.z = k
m.q = h
h.t = l
n.o = m
n.z = h
n.x = i
n.s = c
n.q = k
a.s = h
a.u = k
a.t = c
a.w = j
c.s = k
c.y = m
c.p = i
d.s = n
d.y = l
d.p = j
j.s = n
j.y = m
j.p = c
i.s = n
i.y = l
i.p = j
k.o = m
k.z = h
k.x = d
k.s = i
k.q = n
l.o = k
l.z = n
l.q = h
assert l.o.o.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: C = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

m.o = n
m.z = k
m.q = h
h.t = l
n.o = m
n.z = h
n.x = i
n.s = c
n.q = k
a.s = h
a.u = k
a.t = c
a.w = j
c.s = k
c.y = m
c.p = i
d.s = n
d.y = l
d.p = j
j.s = n
j.y = m
j.p = c
i.s = n
i.y = l
i.p = j
k.o = m
k.z = h
k.x = d
k.s = i
k.q = n
l.o = k
l.z = n
l.q = h
assert l.o.o.o.s.txt == "c"