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

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

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

i = A("i")
m = B("m")
e = C("e")
a = B("a")
f = C("f")
l = B("l")
b = B("b")
k = A("k")
h = B("h")
d = C("d")

i.s = k
i.y = k
i.o = l
m.o = a
e.w = f
e.x = l
e.z = i
a.o = h
f.w = d
f.x = b
f.z = k
l.o = m
b.o = a
k.s = i
k.y = i
k.o = h
h.o = b
d.w = f
d.x = b
d.z = k
assert e.z.s.s.o.txt == "
class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: A = None
        self.o: B = None
        self.txt = txt

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

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

i = A("i")
m = B("m")
e = C("e")
a = B("a")
f = C("f")
l = B("l")
b = B("b")
k = A("k")
h = B("h")
d = C("d")

i.s = k
i.y = k
i.o = l
m.o = a
e.w = f
e.x = l
e.z = i
a.o = h
f.w = d
f.x = b
f.z = k
l.o = m
b.o = a
k.s = i
k.y = i
k.o = h
h.o = b
d.w = f
d.x = b
d.z = k
assert e.z.s.s.o.txt == "l"