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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.txt = txt

c = A("c")
h = B("h")
n = C("n")
m = C("m")
l = B("l")
f = A("f")
g = A("g")
j = A("j")
i = A("i")
k = C("k")

c.s = h
c.z = g
c.r = l
h.v = n
h.y = l
h.o = j
n.y = l
n.t = l
m.y = l
m.t = l
l.v = m
l.y = h
l.o = f
f.s = h
f.r = h
f.z = j
g.s = l
g.z = j
g.r = h
j.s = h
j.r = h
j.z = i
i.s = l
i.r = l
i.z = g
k.y = l
k.t = l
assert n.t.v.t.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: A = None
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.txt = txt

c = A("c")
h = B("h")
n = C("n")
m = C("m")
l = B("l")
f = A("f")
g = A("g")
j = A("j")
i = A("i")
k = C("k")

c.s = h
c.z = g
c.r = l
h.v = n
h.y = l
h.o = j
n.y = l
n.t = l
m.y = l
m.t = l
l.v = m
l.y = h
l.o = f
f.s = h
f.r = h
f.z = j
g.s = l
g.z = j
g.r = h
j.s = h
j.r = h
j.z = i
i.s = l
i.r = l
i.z = g
k.y = l
k.t = l
assert n.t.v.t.y.y.txt == "l"