class A:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

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

j.z = b
j.o = b
h.o = c
h.u = c
h.t = f
g.v = i
g.w = h
g.s = h
e.v = g
e.w = h
e.s = c
b.z = j
b.o = j
c.o = h
c.u = h
c.t = g
i.v = g
i.w = h
i.s = h
f.v = e
f.w = c
f.s = c
assert e.s.o.o.u.u.o.txt == "h"