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

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

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

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

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

l = A("l")
i = B("i")
c = C("c")
n = D("n")
m = E("m")

l.s = i
l.o = i
l.u = m
l.q = c
i.u = m
i.v = m
i.p = l
i.z = c
i.o = c
c.p = i
c.w = m
c.t = n
n.r = i
n.u = i
n.w = c
n.y = c
n.t = m
m.u = c
assert m.u.t.w.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: E = None
        self.q: C = None
        self.o: B = None
        self.txt = txt

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

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

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

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

l = A("l")
i = B("i")
c = C("c")
n = D("n")
m = E("m")

l.s = i
l.o = i
l.u = m
l.q = c
i.u = m
i.v = m
i.p = l
i.z = c
i.o = c
c.p = i
c.w = m
c.t = n
n.r = i
n.u = i
n.w = c
n.y = c
n.t = m
m.u = c
assert m.u.t.w.w.u.txt == "c"