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

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

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

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

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

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

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

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

k.t = a
k.y = g
a.z = f
a.y = e
a.v = i
d.u = j
e.z = i
e.y = a
e.v = f
f.z = a
f.y = a
f.v = i
b.u = j
j.z = a
j.y = i
j.v = e
c.u = e
i.z = e
i.v = e
i.y = f
g.t = i
g.y = k
assert a.y.y.y.txt == "e"