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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.o: A = None
        self.p: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: D = None
        self.t: E = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.z: I = None
        self.y: B = None
        self.v: C = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: G = None
        self.x: B = None
        self.z: C = None
        self.txt = txt

i = A("i")
f = B("f")
g = C("g")
n = D("n")
a = E("a")
b = F("b")
h = G("h")
e = H("e")
c = I("c")

i.w = f
f.z = c
f.w = c
g.t = c
g.u = f
g.o = f
g.v = f
g.z = i
n.t = e
a.z = g
a.w = g
a.o = i
a.p = b
a.r = h
b.y = n
b.s = c
h.r = f
h.w = n
h.t = a
h.u = g
e.o = n
e.t = g
e.v = g
e.z = c
e.y = f
e.x = b
c.y = f
c.x = f
c.p = h
c.z = g
assert c.z.v.z.z.o.z.y.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.o: A = None
        self.p: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: D = None
        self.t: E = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.z: I = None
        self.y: B = None
        self.v: C = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: G = None
        self.x: B = None
        self.z: C = None
        self.txt = txt

i = A("i")
f = B("f")
g = C("g")
n = D("n")
a = E("a")
b = F("b")
h = G("h")
e = H("e")
c = I("c")

i.w = f
f.z = c
f.w = c
g.t = c
g.u = f
g.o = f
g.v = f
g.z = i
n.t = e
a.z = g
a.w = g
a.o = i
a.p = b
a.r = h
b.y = n
b.s = c
h.r = f
h.w = n
h.t = a
h.u = g
e.o = n
e.t = g
e.v = g
e.z = c
e.y = f
e.x = b
c.y = f
c.x = f
c.p = h
c.z = g
assert c.z.v.z.z.o.z.y.w.txt == "c"