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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.v: F = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

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

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

a.o = k
a.s = i
j.q = m
h.w = d
h.s = k
i.r = b
i.z = b
i.v = e
l.o = i
l.t = i
l.v = a
l.z = j
l.w = k
l.q = h
k.o = l
k.s = e
m.v = l
m.z = j
e.y = a
e.s = d
e.v = k
e.z = i
e.o = h
b.t = d
d.o = i
d.t = i
d.v = a
d.z = j
d.w = k
d.q = h
assert m.z.q.v.z.q.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: E = None
        self.v: F = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

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

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

a.o = k
a.s = i
j.q = m
h.w = d
h.s = k
i.r = b
i.z = b
i.v = e
l.o = i
l.t = i
l.v = a
l.z = j
l.w = k
l.q = h
k.o = l
k.s = e
m.v = l
m.z = j
e.y = a
e.s = d
e.v = k
e.z = i
e.o = h
b.t = d
d.o = i
d.t = i
d.v = a
d.z = j
d.w = k
d.q = h
assert m.z.q.v.z.q.z.q.txt == "m"