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

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

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

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

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

m = A("m")
b = B("b")
k = C("k")
l = D("l")
j = E("j")
a = E("a")
d = C("d")

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

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

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

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

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

m = A("m")
b = B("b")
k = C("k")
l = D("l")
j = E("j")
a = E("a")
d = C("d")

m.w = d
m.y = l
b.s = a
b.y = d
b.x = d
b.q = l
b.o = j
k.t = a
k.o = l
k.z = l
l.y = j
l.r = d
l.u = b
l.p = k
j.y = a
j.s = b
j.r = m
j.z = m
a.y = j
a.s = b
a.r = m
a.z = m
d.t = a
d.o = l
d.z = l
assert m.y.r.z.txt == "l"