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

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

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

i = A("i")
c = B("c")
k = C("k")
f = B("f")
a = C("a")
l = B("l")
e = A("e")
h = A("h")
b = A("b")
j = B("j")

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

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

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

i = A("i")
c = B("c")
k = C("k")
f = B("f")
a = C("a")
l = B("l")
e = A("e")
h = A("h")
b = A("b")
j = B("j")

i.r = a
c.o = a
c.s = a
c.w = j
k.z = a
k.s = a
k.q = e
f.o = k
f.s = k
f.w = j
a.z = k
a.s = k
a.q = b
l.o = a
l.w = f
l.s = k
e.r = k
h.r = k
b.r = a
j.o = k
j.w = f
j.s = a
assert l.w.s.s.z.q.txt == "e"