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

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

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

a = A("a")
c = B("c")
l = C("l")
n = B("n")
b = C("b")
k = C("k")
d = A("d")
e = B("e")
h = B("h")

a.s = k
a.r = k
a.u = d
c.o = h
c.s = d
l.z = k
l.w = d
n.o = c
n.s = d
b.z = l
b.w = a
k.z = l
k.w = a
d.s = k
d.u = a
d.r = b
e.o = n
e.s = a
h.o = n
h.s = a
assert n.o.s.r.z.z.w.u.s.w.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: A = None
        self.r: C = None
        self.txt = txt

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

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

a = A("a")
c = B("c")
l = C("l")
n = B("n")
b = C("b")
k = C("k")
d = A("d")
e = B("e")
h = B("h")

a.s = k
a.r = k
a.u = d
c.o = h
c.s = d
l.z = k
l.w = d
n.o = c
n.s = d
b.z = l
b.w = a
k.z = l
k.w = a
d.s = k
d.u = a
d.r = b
e.o = n
e.s = a
h.o = n
h.s = a
assert n.o.s.r.z.z.w.u.s.w.txt == "a"