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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

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

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

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

f = A("f")
m = B("m")
n = C("n")
j = D("j")
d = E("d")
b = D("b")
a = C("a")
l = B("l")
g = C("g")

f.s = l
f.y = j
f.z = j
f.v = b
m.r = f
m.s = f
m.u = b
n.w = d
n.o = f
j.q = m
j.o = d
j.z = n
d.w = f
d.y = j
b.q = l
b.o = d
b.z = g
a.w = d
a.o = f
l.r = f
l.s = f
l.u = b
g.w = d
g.o = f
assert m.r.y.z.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: D = None
        self.z: D = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.s: A = None
        self.u: D = None
        self.txt = txt

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

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

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

f = A("f")
m = B("m")
n = C("n")
j = D("j")
d = E("d")
b = D("b")
a = C("a")
l = B("l")
g = C("g")

f.s = l
f.y = j
f.z = j
f.v = b
m.r = f
m.s = f
m.u = b
n.w = d
n.o = f
j.q = m
j.o = d
j.z = n
d.w = f
d.y = j
b.q = l
b.o = d
b.z = g
a.w = d
a.o = f
l.r = f
l.s = f
l.u = b
g.w = d
g.o = f
assert m.r.y.z.o.s.txt == "l"