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

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

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

h = A("h")
i = B("i")
e = C("e")
f = B("f")
b = C("b")
k = B("k")
g = B("g")
c = A("c")

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

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

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

h = A("h")
i = B("i")
e = C("e")
f = B("f")
b = C("b")
k = B("k")
g = B("g")
c = A("c")

h.y = g
h.v = f
i.z = b
i.s = e
i.y = k
e.o = i
e.v = c
e.u = b
f.z = b
f.s = e
f.y = i
b.o = i
b.v = c
b.u = e
k.z = b
k.s = b
k.y = g
g.z = e
g.s = e
g.y = i
c.y = f
c.v = f
assert e.v.y.z.u.u.u.u.u.txt == "e"