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

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

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

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

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

k = A("k")
l = B("l")
i = C("i")
e = D("e")
m = E("m")
b = B("b")
h = E("h")
j = B("j")

k.s = e
k.u = e
k.y = e
k.q = i
k.o = l
l.z = i
l.q = k
l.p = j
i.y = k
i.z = h
e.t = h
e.v = i
m.p = j
m.z = k
b.z = i
b.q = k
b.p = l
h.p = b
h.z = k
j.z = i
j.q = k
j.p = b
assert m.z.q.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: D = None
        self.q: C = None
        self.y: D = None
        self.o: B = None
        self.txt = txt

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

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

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

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

k = A("k")
l = B("l")
i = C("i")
e = D("e")
m = E("m")
b = B("b")
h = E("h")
j = B("j")

k.s = e
k.u = e
k.y = e
k.q = i
k.o = l
l.z = i
l.q = k
l.p = j
i.y = k
i.z = h
e.t = h
e.v = i
m.p = j
m.z = k
b.z = i
b.q = k
b.p = l
h.p = b
h.z = k
j.z = i
j.q = k
j.p = b
assert m.z.q.y.s.txt == "e"