class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: H = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: A = None
        self.s: E = None
        self.r: H = None
        self.y: D = None
        self.t: H = None
        self.v: C = None
        self.o: H = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: H = None
        self.z: F = None
        self.s: E = None
        self.t: D = None
        self.u: H = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: H = None
        self.t: E = None
        self.v: F = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.q: H = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: A = None
        self.u: F = None
        self.r: B = None
        self.w: I = None
        self.x: B = None
        self.y: E = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.o: D = None
        self.q: E = None
        self.p: G = None
        self.s: H = None
        self.u: D = None
        self.txt = txt

a = A("a")
l = B("l")
g = C("g")
f = D("f")
k = E("k")
b = F("b")
c = G("c")
m = H("m")
h = I("h")

a.z = m
a.p = m
a.v = m
l.w = a
l.p = a
l.s = k
l.r = m
l.t = m
l.o = m
l.q = m
l.y = f
l.v = g
g.w = l
g.x = l
g.p = m
g.u = m
g.z = b
g.s = k
g.t = f
f.o = c
f.q = c
f.u = m
f.t = k
f.v = b
k.z = h
k.r = c
k.q = m
k.y = b
b.p = l
b.t = k
c.q = f
c.v = a
c.u = b
c.r = l
c.x = l
c.w = h
c.y = k
c.p = m
m.x = g
m.s = c
h.t = b
h.r = c
h.p = c
h.o = f
h.u = f
h.q = k
h.s = m
assert c.u.t.q.s.r.w.v.x.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: H = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: A = None
        self.s: E = None
        self.r: H = None
        self.y: D = None
        self.t: H = None
        self.v: C = None
        self.o: H = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: H = None
        self.z: F = None
        self.s: E = None
        self.t: D = None
        self.u: H = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: H = None
        self.t: E = None
        self.v: F = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.q: H = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: A = None
        self.u: F = None
        self.r: B = None
        self.w: I = None
        self.x: B = None
        self.y: E = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: G = None
        self.o: D = None
        self.q: E = None
        self.p: G = None
        self.s: H = None
        self.u: D = None
        self.txt = txt

a = A("a")
l = B("l")
g = C("g")
f = D("f")
k = E("k")
b = F("b")
c = G("c")
m = H("m")
h = I("h")

a.z = m
a.p = m
a.v = m
l.w = a
l.p = a
l.s = k
l.r = m
l.t = m
l.o = m
l.q = m
l.y = f
l.v = g
g.w = l
g.x = l
g.p = m
g.u = m
g.z = b
g.s = k
g.t = f
f.o = c
f.q = c
f.u = m
f.t = k
f.v = b
k.z = h
k.r = c
k.q = m
k.y = b
b.p = l
b.t = k
c.q = f
c.v = a
c.u = b
c.r = l
c.x = l
c.w = h
c.y = k
c.p = m
m.x = g
m.s = c
h.t = b
h.r = c
h.p = c
h.o = f
h.u = f
h.q = k
h.s = m
assert c.u.t.q.s.r.w.v.x.z.txt == "b"