class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: C = None
        self.v: G = None
        self.o: B = None
        self.r: C = None
        self.y: H = None
        self.p: H = None
        self.w: E = None
        self.u: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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