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

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

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

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

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

k = A("k")
n = B("n")
e = C("e")
m = D("m")
b = E("b")
j = C("j")
f = B("f")
a = C("a")

k.o = b
k.s = b
k.r = m
n.u = k
n.v = m
e.y = b
e.p = a
e.s = k
e.x = k
e.o = m
m.p = b
m.s = k
b.y = m
b.u = m
b.o = m
b.x = m
j.y = b
j.p = e
j.s = k
j.x = k
j.o = m
f.u = k
f.v = m
a.y = b
a.p = j
a.s = k
a.x = k
a.o = m
assert b.y.s.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

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

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

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

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

k = A("k")
n = B("n")
e = C("e")
m = D("m")
b = E("b")
j = C("j")
f = B("f")
a = C("a")

k.o = b
k.s = b
k.r = m
n.u = k
n.v = m
e.y = b
e.p = a
e.s = k
e.x = k
e.o = m
m.p = b
m.s = k
b.y = m
b.u = m
b.o = m
b.x = m
j.y = b
j.p = e
j.s = k
j.x = k
j.o = m
f.u = k
f.v = m
a.y = b
a.p = j
a.s = k
a.x = k
a.o = m
assert b.y.s.s.o.txt == "m"