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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: B = None
        self.y: H = None
        self.v: I = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.t: A = None
        self.p: B = None
        self.q: D = None
        self.o: C = None
        self.z: I = None
        self.r: B = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.s: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: D = None
        self.o: G = None
        self.r: B = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: B = None
        self.y: H = None
        self.v: I = None
        self.r: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.t: A = None
        self.p: B = None
        self.q: D = None
        self.o: C = None
        self.z: I = None
        self.r: B = None
        self.v: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.s: A = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: D = None
        self.o: G = None
        self.r: B = None
        self.z: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: D = None
        self.txt = txt

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

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