class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: G = None
        self.q: B = None
        self.z: C = None
        self.o: E = None
        self.y: I = None
        self.p: B = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: E = None
        self.t: A = None
        self.p: D = None
        self.x: I = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: A = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: I = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: E = None
        self.t: A = None
        self.p: D = None
        self.x: I = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: A = None
        self.u: C = None
        self.r: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: I = None
        self.o: F = None
        self.txt = txt

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

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

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

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