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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

l.s = m
l.z = m
l.x = h
l.y = h
l.q = k
h.x = m
m.t = j
m.y = k
m.o = k
j.z = k
j.t = l
j.y = m
k.v = l
k.y = l
k.t = l
k.q = h
k.z = j
assert m.y.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: C = None
        self.x: B = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

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

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

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

l.s = m
l.z = m
l.x = h
l.y = h
l.q = k
h.x = m
m.t = j
m.y = k
m.o = k
j.z = k
j.t = l
j.y = m
k.v = l
k.y = l
k.t = l
k.q = h
k.z = j
assert m.y.z.y.txt == "m"