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

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

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

m = A("m")
k = B("k")
b = C("b")
c = C("c")
d = A("d")
j = B("j")
h = C("h")
i = A("i")
n = A("n")
e = A("e")

m.s = k
k.o = j
k.p = j
k.u = n
b.w = k
b.s = k
c.w = k
c.s = k
d.s = k
j.o = k
j.p = k
j.u = n
h.w = k
h.s = k
i.s = k
n.s = k
e.s = j
assert n.s.u.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

m = A("m")
k = B("k")
b = C("b")
c = C("c")
d = A("d")
j = B("j")
h = C("h")
i = A("i")
n = A("n")
e = A("e")

m.s = k
k.o = j
k.p = j
k.u = n
b.w = k
b.s = k
c.w = k
c.s = k
d.s = k
j.o = k
j.p = k
j.u = n
h.w = k
h.s = k
i.s = k
n.s = k
e.s = j
assert n.s.u.s.u.txt == "n"