class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: E = None
        self.r: H = None
        self.z: E = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: D = None
        self.y: H = None
        self.u: H = None
        self.t: H = None
        self.r: G = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.z: H = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: I = None
        self.v: D = None
        self.p: H = None
        self.t: I = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: D = None
        self.y: H = None
        self.u: H = None
        self.t: H = None
        self.r: G = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.z: H = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: I = None
        self.v: D = None
        self.p: H = None
        self.t: I = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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