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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: F = None
        self.o: I = None
        self.v: I = None
        self.u: F = None
        self.p: C = None
        self.z: G = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: H = None
        self.p: B = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: F = None
        self.o: I = None
        self.v: I = None
        self.u: F = None
        self.p: C = None
        self.z: G = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: F = None
        self.t: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: H = None
        self.p: B = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

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

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