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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.x: B = None
        self.t: I = None
        self.y: H = None
        self.s: F = None
        self.u: F = None
        self.o: B = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: I = None
        self.o: B = None
        self.r: A = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: G = None
        self.z: G = None
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: B = None
        self.x: B = None
        self.t: I = None
        self.y: H = None
        self.s: F = None
        self.u: F = None
        self.o: B = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: I = None
        self.o: B = None
        self.r: A = None
        self.t: A = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: G = None
        self.z: G = None
        self.p: F = None
        self.txt = txt

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

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