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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: A = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: G = None
        self.q: C = None
        self.v: C = None
        self.o: I = None
        self.t: E = None
        self.s: I = None
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: E = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: I = None
        self.t: F = None
        self.w: G = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: A = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: G = None
        self.q: C = None
        self.v: C = None
        self.o: I = None
        self.t: E = None
        self.s: I = None
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: E = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: I = None
        self.t: F = None
        self.w: G = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

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

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