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

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

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

d = A("d")
i = B("i")
c = C("c")
e = B("e")
k = B("k")
a = C("a")
j = C("j")
g = C("g")
b = C("b")

d.t = e
d.r = e
d.v = k
i.o = b
c.z = i
c.v = i
c.o = g
e.o = a
k.o = c
a.z = i
a.o = g
a.v = k
j.z = e
j.v = e
j.o = a
g.z = i
g.o = c
g.v = k
b.z = e
b.o = j
b.v = i
assert k.o.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: B = None
        self.r: B = None
        self.txt = txt

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

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

d = A("d")
i = B("i")
c = C("c")
e = B("e")
k = B("k")
a = C("a")
j = C("j")
g = C("g")
b = C("b")

d.t = e
d.r = e
d.v = k
i.o = b
c.z = i
c.v = i
c.o = g
e.o = a
k.o = c
a.z = i
a.o = g
a.v = k
j.z = e
j.v = e
j.o = a
g.z = i
g.o = c
g.v = k
b.z = e
b.o = j
b.v = i
assert k.o.o.o.txt == "c"