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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.o: E = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.r: E = None
        self.z: B = None
        self.s: B = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.o: E = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: D = None
        self.r: E = None
        self.z: B = None
        self.s: B = None
        self.t: E = None
        self.txt = txt

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

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