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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: I = None
        self.x: B = None
        self.q: A = None
        self.p: H = None
        self.w: A = None
        self.v: F = None
        self.y: I = None
        self.z: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: H = None
        self.v: I = None
        self.t: C = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.w: E = None
        self.o: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: I = None
        self.x: B = None
        self.q: A = None
        self.p: H = None
        self.w: A = None
        self.v: F = None
        self.y: I = None
        self.z: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: H = None
        self.v: I = None
        self.t: C = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: F = None
        self.w: E = None
        self.o: G = None
        self.txt = txt

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

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