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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: H = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: B = None
        self.x: B = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.q: D = None
        self.o: E = None
        self.p: D = None
        self.z: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: H = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: B = None
        self.x: B = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: D = None
        self.q: D = None
        self.o: E = None
        self.p: D = None
        self.z: F = None
        self.txt = txt

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

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

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