class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: H = None
        self.q: G = None
        self.y: G = None
        self.x: D = None
        self.s: G = None
        self.o: B = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: A = None
        self.x: H = None
        self.r: E = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: B = None
        self.t: B = None
        self.s: A = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: A = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: B = None
        self.y: C = None
        self.v: B = None
        self.t: B = None
        self.z: A = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: A = None
        self.x: H = None
        self.r: E = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: F = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: B = None
        self.t: B = None
        self.s: A = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: A = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: B = None
        self.y: C = None
        self.v: B = None
        self.t: B = None
        self.z: A = None
        self.u: E = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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